Dave's Notebook

Git, Gitosis, Putty and Windows

GITI was recently sold on the idea of replacing SubVersion as my version control of choice and moving to GIT, or at least installing GIT and seeing for myself if it is that much better than SubVersion. The first step was to install GIT on my computers so that I could play with it. Installing GIT on my 2008 server was relatively painless since everything on the server runs under Cygwin. I followed the well written instructions here:

Where I got stuck was on the client side. First, I tried installing msysgit, which I think I must have installed from the wrong exe because I eventually had trouble using it outside of a bash script. But don’t worry about that because I’m going to show you a much easier way. Then I tried installing TortoiseGit. Had I installed msysgit correctly, I probably would have stuck with making that work. But I’m glad I couldn’t get it working because it caused me to dig deeper into TortoiseGit and discover that it really isn’t at a point where I can recommend it to anyone. I might have quit there, but I had also seen that there was another project for Windows Git called Git Extensions, which is really easy to set up and includes the installation for Git, so you don’t have to go and figure out which is the correct installation for msysgit. When you install Git Extensions, you will come to a screen where you’ll be given the option to install Git and KDiff. Do so. image image When you install MsysGit, select the options to add “Git Bash Here” and “Git GUI Here” You’ll also want to select the option to run Git from the Windows command prompt. image The KDiff install is pretty straight forward. I’ve been using KDiff for a while with SubVersion and it does a great job handling merges that SubVersion doesn’t do well on its own. Finally, install the extensions. When you get to the screen that asks if you want to use OpenSSH or Putty, select Putty. image Next, run the GitExtensions to set some of the configurations, like your email address. Next, you’ll want to generate an SSH key image Select “Generate or import key” from the menu. image Click the “Generate” button and move your mouse over the designated area. Since the server is using OpenSSHd for the SSH server, you’ll need to copy the text out of the top area and paste it into a text file so that you can put the public key on the server as described in the server articles I linked to above. image You can make the key comment whatever you want. Do NOT use the “Save public key” button to save the public key. That will not save in the correct format. Once you’ve set a password, save the private key some place on your system that you can load later. If you’re using a standard port for the SSH server, you should be all set. My problem is that I’m not, and that’s where the trouble began for me. My next post will discuss how this configuration gets us around that issue. Other places talking about Git, Gitosis and Putty Geek Gumbo » Git in Windows – Getting Started with the Git GUI - You should have Git Bash icon on your desktop. Click it and up pops a linux command window. Don’t panic. This is like the Windows command window, only it runs Linux. There is a neat little GUI that will make the command window go away. … Eduardo Laranjeira » How to configure Git on Windows - In the previous article, I’ve shown how to install Git on Windows 7, but before you can start using it, there’s some basic configuration that needs to be done. In this article I’ll show how to setup your user name and email address, … Technical Jargon » Using Git with Windows Powershell - Whenever I’m working with a Git repository I tend to do so from a Windows Powershell command line running inside Console. I prefer this to the UNIX-like “git bash” that comes with msysgit and it’s fairly straightforward to extend …