Thursday, January 22, 2009

I finally 'git' it

I started work on several personal projects of mine at home and very soon realized that managing code for these projects was getting out of hand.

After making sure that the code worked, I tarballed the folders and stored them a couple of times. However, once I started coding more regularly, I realized that the tarballing approach will not work. It is difficult to maintain and very impractical.

I wanted to have a revision control system in place that would be easy to use and required very little work from my side. Since, I was working on this alone, I also wanted something that would work on my machine but is easy to set up on another machine with very little effort. I used Perforce extensively for a very long time and was comfortable with it. But setting it and having to back it up regularly would have taken up too much of my time.

I tried CVS and after the first day, I started not really liking it. Since I was working on Android and used 'git', ableit very briefly, I wanted to give it a shot.

I did not realize till I downloaded the source code to build it that it was designed and developed by Linus Torvalds for Linux kernel development. I found this great video of Linus' talk on git when he visited the Google campus.

I setup 'git' on my machine in less than 5 minutes and completed my first checkin soon after that. Within the hour, I also setup 'gitweb' to access git repositories via the browser.

After a week's use I can say that I love 'git'. It is very simple to setup and use and moreover it is distributed making a central repository totally unnecessary. In fact, Linus in his talk said that he considered several alternatives to BitKeeper but anything that was not distributed was discarded immediately.

'git' can be downloaded and built from here and you can find the documentation here and here.

Update: Yet another great document on how to use 'git' and 'repo'.

1 comment:

Srikanth said...

I heard a lot about GIT but most of it was like "GIT? It's created by Linus Torvalds for Linus Torvalds." Though I never gave it a shot, I watched Linus' video long back and I vaguely remember him calling all the Subversion lovers "ugly and stupid." :)