Set up TortoiseGit to work with GitHub

TortoiseGit is the easiest and most comfortable Git interface I know for Windows. It integrates seamlessly with Windows explorer and simplifies common tasks as commit, checkout, pull, push, etc. I'm so used to it that I always recommend it to everyone.
If anything I enforce more than the use Tortoise, is the use Git itself. Version control systems are one of the most powerful tools a developer can have. Switching from traditional (manual) code back up systems to any form of version control system is a qualitative change that can easily increase your productivity by an order of magnitude. Not to mention the benefits of version control when you're working in a multi-person project. In such case, version control is simply a must. And of all VCS I've tried, Git is the by far. Under Windows, Git is supported by mSysGit.
Below, I will present a way to install both mSysGit and TortoiseGit and make the work together with GitHub, one of the most popular repositories over the internet, and the one I use most.

Installing mSysGit:
As the time of this writing, the latest version of mSysGit is 1.8.4 and you can download it from https://code.google.com/p/msysgit/downloads/list.
Download and run the installer, you will be presented a screen like this:

Click next, a few times, select a directory for installation, and click next again. Your screen should look like this:

Under "Windows Explorer integration", I suggest switching to "Simple context menu(Registry based)", but that's mostly because I prefer native integration than depending on plug-ins whenever possible.
Click next a couple more times and you will get to an importan window:

As long as you don't have Git already installed through Cygwin (If you have it, you most likely know you have it), select the second option and click next to get to the following screen:

As you probably know, windows and unix systems encode line endings in different formats. This can be annoying if you, or some of your team mates (or even some other people interested in your project), use different platforms. Thus, I recommend choosing the second option, wich will help keeping your repository clean. Only if your development IDE doesn't support unix-like endings (and any decent IDE will support them), would I suggest going with the first option. Anyway, please don't choose the last one.
After you click next again, installation will begin. Wait for it to complete and click finish.

Installing TortoiseGit:
First of all, download TortoiseGit from here: https://code.google.com/p/tortoisegit/wiki/Download?tm=2. Currently, the latest version is, and that's the one I will use (64bits edition).
Run the installer and click next a couple of times until you get here:

Choose "OpenSSH, Git default SSH Client", so TortoiseGit will integrate with our recent installation of mSysGit and click next until the installer finishes.

Working with GitHub:
Now the process for working with GitHub (or any other Git repository that supports ssh connections) is quite simple:
- Create an account
- Clone a repo
- Work with it (commit, push, etc)
Using this method you don't need to create any SSH keys, which I think is simpler for new users, but you will have to introduce your password at least once per session (I think this is a pretty reasonable safety measure anyway).

No comments:

Post a Comment