Revealed by sykora within linux, programming on September 12th, 2008
I first tried using a code management programming when I was playing with the drupal codebase. They used cvs, and after great difficulty, I got that to work (my fault, not theirs). It was a nice feeling, being able to “checkout” the HEAD branch, and look at what was actually happening. I didn’t however, learn how to use cvs at that time, since I was more into the actual code, than how it was being stored. What I did notice was that I would never be able to write back to the main code repository, ie I would never be able to commit. Anything I wanted to contribute had to be done through the patch submission process.
Quit some time later, I read an article on git. It’s relatively new, only 2 years old. It was started by Linus Torvalds, for managing the source code for the linux kernel. After hearing more and more about git, I thought I should check it out.
git is surprisingly easy to use. I would never have dreamed of trying to set up my own cvs/svn repo with as much ease as I have done with git. Inserting an existing project into a git repo is as easy as :
The following quote from the linux-mips wiki sums things up pretty well :
We will hereby start scouring the net for people who say git is hard to understand and use, and just kill them. They clearly are just polluting the gene pool.
– Linus
I also saw this Google tech-talk of Linus Torvalds talking about git and why it’s better. It’s an awesome watch for anyone interested.
Git follows a distributed design philosophy, where each person can play with their own code, and whenever someone else thinks there’s something worth looking at, they can pull from them. This eliminates the need to have a central repository of code, as well as a group of elite users with commit access to the repo.
Did I mention that git is fast?
Just as I was ridinng this wave, QwertyM told me about GitHub, a service that provides hosting for code, and allows (or rather is focussed around) user access of code through git. After some fumbling around with ssh keys, I set up my account with GitHub. You can find it at http://github.com/sykora/, where I’ve also uploaded the code for my limits project.
Because git doesn’t mess around with a centralized repository, it’s easy to use even for small, personal projects, and I definitely recommend it for anyone who’s managing code.
Note: As far as I know, git support in windows is still transitional. If that’s what you need, check out Mercurial.
Tags: git, github, linux, programming