Getting on Git

I’m trying out Git. Its a distributed version control system originally written by Linus Torvalds. I also looked at SVK and Mercurial but settled with Git since it’s commands made more sense to me.

I was happy with Subversion since 2004. Working alone with my notebook and client servers it has been very useful. Now the problem is I have too many workstations, servers, repositories and checkouts lying around I have to check where my latest code is before I start on any project.

I tried moving them to 2 online servers and checking out from there. But its slow and when I loose power or without an Internet connection I’m stuck.

Git might help me. When I’m done working on a project I should be able to commit locally and also sync a remote repository when I’m online. That way when I’m on another pc I can pull from a remote repository and start working.

All this is speculation at this point I will report back if it works as planned. If not I’m sticking with Subversion. :)

Being on Ubuntu Gutsy Gibbon I tried a aptitude search to see if I can install it.

aptitude search git

I thought I found it and installed the git package. I was wrong. You have to install the git-core package to get git.

sudo aptitude install git-core

And if your like and have some Subversion repositories to import you need to also install git-svn.

sudo aptitude install git-svn

Now to import a Subversion repository create a new directory for your git workspace and run something like this.

git-svnimport -v http://path.to.your/repo/

Check out this tutorial introduction to git.