Pages

Monday, January 2, 2012

Setting up a project on Github

I've been an SVN user for a while, but it seems like more and more projects are going distributed version control systems like Git so I wanted to learn how to use Git. I found this crash course on Git for SVN users which provides a useful Rosetta stone, and this warning:

SVN is based on an older version control system called CVS, and its designers followed a simple rule: when in doubt, do like CVS. Git also takes a form of inspiration from CVS, and its designer also followed a simple rule: when in doubt, do exactly the opposite of CVS. This approach lead to many technical innovations, but also lead to a lot of extra headscratching among migrators. You have been warned.

This sounds a lot link Linus Torvalds' talk, WWCVSND: What Would CVS Not Do?

Since I already use password-less ssh to hop between the boxes in my little network, I didn't move my old public key as in the instructions. I created a config file in the .ssh directory containing these lines:
Host github.com
User git
Port 22
Hostname github.com
IdentityFile ~/.ssh/id_rsa_git
TCPKeepAlive yes
IdentitiesOnly yes
Where id_rsa_git.pub is the key I uploaded to github. Authenticating to github is then just:ssh -T git@github.com
Then you accept their RSA key like you would for doing any other ssh login.