Search code examples
gitcygwinuninstallation

Uninstalling GIT on windows


I have had various msysgit installs on my windows vista laptop over the past year, using the "msysGit-fullinstall", "msysGit-netinstall" and "preview installers. Also, installed / used different versions along the way. I also had a GIT binary installed as part of my Cygwin package. I screwed up along the way (actually, I could not edit .gitconfig anymore), and decided to go nuclear and remove GIT to allow me the have a fresh install (which I can love a bit more :) ).

I tried the below steps, but still the build fails with the error "Old version git-* commands still remain in bindir" - when attempting to use the net installer. - I removed GIT through Add / Remove programs in control - Removed all GIT files from usr/local/bin - and every other "git" file I could find - I even removed my Cygwin enviorment - My current %HOME% directory is empty

If I chose to install via the "preview" or "full" installers, it works, can I can use the GIT env / commands - except I again cannot edit the .gitconfig file, and get the error message:

"error: could not lock config file .git/config: No such file or directory"

In summary, I have a botched GIT windows env, so how can I clean it such that I can reinstall GIT!

Thanks.


Solution

  • There are two steps that you have to do to manually "uninstall" git on Windows:

    1. You have to remove all paths to your bin folders from your PATH environment variable
    2. Remove folder where your git/Cygwin are installed.

    After that you can install Cygwin-less msysgit from here: http://code.google.com/p/msysgit/downloads/list