Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to "un-git-ify" my HD

So a few months ago, I apparently created a local repository, in the form of my user folder on my hard drive. I did this using some fool's attempt at a Git101 documentation, and as a result I currently have 168,352 pending/unstated changes. Is there a way to not only remove the git bookmark (from source tree), but also remove all of the .git* files from each folder?

Obviously, my goal is not to remove the contents from my user folder... as that would be bad.

like image 375
user2659035 Avatar asked May 14 '26 19:05

user2659035


1 Answers

If you did git init in the root of your user folder, it should have only created a .git folder in that folder itself.

You can remove it without damaging your actual files by executing the following in a terminal from your home folder:

rm -rf ~/.git/
like image 55
chucksmash Avatar answered May 16 '26 07:05

chucksmash



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!