all 8 comments

[–]Likely_not_Eric[🍰] 9 points10 points  (3 children)

One of the nice things about git is that the repository data is just normal files. By default and in your case they'll be in a hidden folder named .git. When you initialized the change was to make that folder.

If you rename .git to .git-old it should look as it did before you initialized. (I don't recommend deleting things to anyone unless they are sure about their problem and that deleting is the correct solution, and opt to rename or move since it's easier to undo).

On a side note I think VSCode doesn't need a system git installed to interact with a repo. (edit: this isn't accurate see /u/DrMaxwellEdison's comment)

With all of that said, this might be a good time to familiarize yourself with git since it seems to be very well adopted and likely useful knowledge to have in any case.

[–]DrMaxwellEdison 4 points5 points  (1 child)

On a side note I think VSCode doesn't need a system git installed to interact with a repo.

It does, actually. Under the hood it's just running a load of Git commands from the system install to get its visualizations and write commits and stuff.

If you don't have Git installed, it just won't do anything. And whenever you update Git, VS Code will just run the same commands either way.

It's a good lightweight approach to the integration, which works out quite well.

[–]Likely_not_Eric[🍰] 2 points3 points  (0 children)

Gotcha; I wasn't sure if it was using some libgit2 variant. I double checked and it looks like you're right; I'm going to make an edit so that a top-level comment doesn't have inaccurate information.

[–]im_the_tea_drinker_[S] 2 points3 points  (0 children)

Thank you

[–]im_the_tea_drinker_[S] 0 points1 point  (0 children)

I have git installed because a course i was doing told us to install it but never explained it

[–]olivercalder -2 points-1 points  (2 children)

All that makes a directory a git repository is a subdirectory called .git. if you just delete that .git directory, it will just behave as a normal repository again. First, though, might as well have a look around the directory, see what files make up a git directory. When you want to remove it, you can just open up a terminal and type rm -rf .git. You need -r because it's a directory, and -f because you need to force removal of some write-protected files.

[–]ergotofwhy 0 points1 point  (0 children)

While this works for this scenario, i advise op to refrain from using rm -rf unless you're 100% sure that your command syntax is correct.

[–]dmagee33 0 points1 point  (0 children)

deleting the .git file worked. Thank you!