How do I stop or change the git repository on my computer?


#1

I’ve done quite a bit over the last year, but not much git. I just found out – thanks to the VSCode IDE warning me – that my git repository is set to my user folder. No bueno.

How do I change this? Also, tips for courses to use to learn git? I haven’t made it far enough on FCC because I went on to other course elsewhere.


#2

That isn’t so good. Hopefully, you haven’t pushed it to github yet.

My advice would be to remove the git files from that folder. You can do this on the terminal (or probably VSCode’s terminal).

  1. cd into the folder you want to remove git from.
  2. ls -a so you can see all the items (including hidden files/folders).
  3. rm -rf .git (This can be dangerous if you use the wrong path. Be very careful to get it right.)
  4. rm .gitignore if it exists.

Again, be careful with that rm command. Only ever delete specific folders.

Everything related to git is in the .git folder, so this effectively deletes version control from the folder in question. If you’ve already pushed it to github, you should just delete that repo on their website.


As for learning, try Tower’s online videos. The first 11 are short and free and should give you a solid start.


#3

Thank you! Turns out that’s what was making Atom absorb all of my computer’s resources as well.