Monday, January 9, 2012

Git Windows is so easy!

I feel I should update this site since it is so hopelessly out of date.

I got Git up and running on an XP with shell integration, and linked to my remote in under 15 minutes, and that's only because I got up to get a cup of water. Now I have it running on my Windows 7 x64 machines as well. As the msysgit project has matured, it has gotten even easier. And there are more Git clients now as well. Git is the most widely used distributed version control system and not just for source control management tool, even writers and others are using it. Why?GitHub, Bitbucket, Gitorious, CodePlex and others all host online Git repositories. Mercurial is also a very popular dvcs.

You might prefer git-cheetah or git-extensions, but they
are basically clones of gitk and git-gui which you will already have. They just add
shell extensions, which msysgit also already has: git-bash (a bash console) and
git-gui. TortoiseGit and GitHub for Windows will also add shell extensions.

This part is really irrelevant.GitHub says it will not work with plink/putty ssh keys,
which is the default in TortoiseGit, but I’ve seen numerous posts that say it
does, maybe the docs are out of date. Also TortoiseGit will give you the option to use Git's SSH client, but claim Putty/Plink works better on Windows. Also since all 3 Tortoise projects share libraries, chances are if you have TortoiseSVN or TortoiseHg you already have Plink.

Git Clients TortoiseGit

In addition to TortoiseGit there is also Github for Windows and Atlassian's SourceTree. There are even more Git clients listed on the Git website. For now I would still recommend against GitHub for Windows, as it is helplessly stoopid. For TortoiseSVN users - I would recommend sticking with TortoiseGit. Either way you will find with Git, the command line is somehow irresistible.

You may need to restart, or you may not.Restart, yay! It works (and even better than tortoiseHg, I
might just uninstall that since it only works best on Windows - there's a problem with the windows api’s that cause the sub-context menu items to appear off the left edge of the menu - I'm going to take a look into that.)

PuttyGen

GitHub only uses ssh and https (Bitbucket also uses ssh and https), so you only need to do this for GitHub or if you want to use ssh, which is cooler so why wouldn't you.

Do you already have a key pair generated? Look for a .ssh
folder.

Create a key: programsàtortoiseGitàputtyGenàgenerate

make sure that you do not already have %userprofile%.ssh
folder, click show hidden files in folder options, or in cmd shell use dir .*
to list all dot folders.

Save keys in %userprofile%\.ssh (you need to make this
directory in cmd shell, mkdir .ssh

Copy the text in the window of your public key and paste in
a file, this is what you will paste into GitHub or Bitbucket.