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.

  • How to set variable from git command output using windows cmd/batch
  • How do I tell git to ignore my local changes, but leave the file in my remote repo?
  • How to discard uncommitted changes in SourceTree?
  • How to reset sourcetree settings/preferences
  • Fastest, least tedious way to amend a commit that is not on the tip of branch?
  • How to push a local repository to remote use “SourceTree”
  • How to ignore files using git-gui (tcl-tk) application?
  • Cloud9 git workspace: how to create?
  • Is git's semi-secret empty tree object reliable, and why is there not a symbolic name for it?
  • How to update forked repo as dependency during npm install?
  • Git: pull from master to topic branch before merging into master?
  • why does Git send whole repository each time push origin master
  • 2 Solutions collect form web for “How to “un-git-ify” my HD”

    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/
    

    Check to see if ~/.git exists. If it does, you can delete, rename or move it to destroy the repository (won’t affect your working copy, i.e. your home folder). Git only has a single .git directory per repository (unlike SVN or CVS, which may have one RCS directory in each working copy directory)

    Git Baby is a git and github fan, let's start git clone.