Installing Git on Windows, as of June 2010

tung's picture

As of June 2010, there's no one-click installer of Git for Windows. Following this blog entry will get you:

  • msysgit, without its shell integration
  • TortoiseGit shell integration instead

msysgit's shell integration is nasty to uninstall, and if you do it wrong it'll pop up a dialog every 10 seconds.

Here's how you do it...

1. Install msysgit

Download msysgit. Make sure it's the "Full installer for official Git", or you'll end up downloading much more, and get much less functionality.

Install msysgit, mostly with the default options. When it asks what functionality to install, uncheck Git shell integration, otherwise you'll have issues if you ever want to uninstall it.

2. Install TortoiseGit

TortoiseGit provides better shell integration than msysgit. If you've used TortoiseSVN, you'll know what to expect.

Anyway, download TortoiseGit.

Install, again with mostly the defaults. When it asks, choose OpenSSH over (Tortoise)Plink, otherwise you can't work with Github.

Once you start using TortoiseGit, you may need to tell it where msysgit lives. By default, you can point it to something like C:\Program Files\Git\bin and it'll work. Test it by selecting the "About" option from the new TortoiseGit right-click menu: you'll see the installed Git version, meaning that it works.

3. Get a File Unlocker (optional)

If you haven't got one already, Google "windows file unlocker" and choose whichever suits your fancy.

The file unlocker helps when deleting repo folders, since TortoiseGit sometimes hangs onto files in them, preventing you from deleting them. Use the file unlocker to override TortoiseGit's grip on them.

If you accidentally installed the msysgit shell integration and you uninstall, you'll be bugged every 10 seconds with a popup dialog. To remedy this, you need to delete the Git shell integration DLL within C:\Program Files\Git using your handy file unlocker.

Conclusion

From here, if you want to use Github from Windows, you can make an SSH key pair using their instructions.

The ideal situation for Git on Windows is a single installer that gives you shell integration like TortoiseGit. It's not like that yet, but I hope future developments move in this direction.