Content

blog, portfolio, and links

Git from the source

Monday 25 June 2007 - Filed under Default

Today, I was searching YouTube for some recent linux videos and ran across this great talk given by Linus Torvalds for Google. The subject of this conversation was Git, his source code management brainchild. The main theme of his talk was that Git is so much better than CVS and Subversion for collaborative software projects because it is distributed.

FYI, Git is used to manage the Linux kernel. Before that, BitKeeper was used, which was also distributed but was managed solely by a single company and was not GPL’d.

Git and distributed source code management solves a couple of problems I’ve struggled with as I wanted to setup a repository for my projects. The first is this problem of deciding who to give commit access to. If I setup a repository so people can track their changes on the project, I don’t want it to get messed up when someone who I think will act in good faith goes and commits small random bug timebombs. Git makes this a moot point because each person really downloads the Git repository and works on their as they wish. It doesn’t talk to my repo until I decide I want to merge some code from their branch because I love it so much.

The second problem is the setup cost. I’ve setup CVS and Subversion before but never made the code tree accessible to the public internet. This is something I want when I write free software but it’s tricky unless you have an afternoon or day to work on it. With Git, I was able to drop the .git folder for my project onto my webserver and (Wham!) people can grab it with a single line.

That line is for my chatr project is:

git clone http://www.davidsterry.com/chatr-git/.git myrepo

Once you run that, you’ll have a complete copy of my repository and can commit to your local copy, or distribute it on your own website. If you work hard enough, maybe people will care more about your repository than mine!

BTW, if you’re running Ubuntu and want to get Git, don’t type ‘sudo apt-get install git’, instead you need to do a ‘sudo apt-get install cogito’. This is to get around a collision with the GNU Information Tools that nobody uses and should by all accounts be erased from all systems.

2007-06-25  »  David Sterry