git: This Year's Version Control Fashion

by Mike Gunderloy - Mar. 21, 2008Comments (8)

Version control systems seem to run in waves in the open source world. For many years, the venerable CVS had the lion's share of usage. Then along came Subversion, with the announced goal of being "a compelling replacement for CVS." Subversion has gained enough popularity to be the baked-in choice in many tracking and management tools. Lately, though, I've been seeing more and more interest in git - the system used to track changes to the Linux kernel itself, among many other things.

If you've never used a distributed version control system before, it might take a bit for you to get comfortable with the concepts behind git. One of the chief differences you'll find between git and systems such as CVS and Subversion is that with git there isn't some master repository of everything that you copy in bits and pieces to your local computer. Instead, your local working copy contains the entire history of the project, and any two copies can exchange patches. It's possible to set git up with a central "master" repository that everyone uses, but that's more of a social convention than a software requirement.

Coupled with this distributed bias, git makes branching and merging almost trivially simple. It takes two commands (most users run git from a shell, though there are graphical front ends available) to create and switch development to a new branch - and even with thousands of files in your repository, it's a fast operation. This makes branching a much more viable strategy for day-to-day development. Even with Subversion, the overhead of branching and merging used to keep me on the main line of development more than I should have been. With git, I can branch even to fix one or two bugs - and even when other developers on the same project are doing their own local branching, we find merges to be fast and easy.

Git is also designed to coexist fairly well with other version control systems. For example, if you're working with a project where everyone else is using a master repository and Subversion, you can simply put your own local working copy into a git repository of your own, and use git commands until you're ready to check back in to the master. There are also import and export hooks to move repositories from Subversion (as well as other popular systems).

The biggest challenge in git, in fact, is not using the system but learning how best to use it. If you're coming from a Subversion background, it's worth reading the git-SVN Crash Course. You'll also find plenty of other documentation on the main git site. If you learn better by seeing than by reading, take a look at the Git Screencast from Peepcode.

The choice of a version control system is driven by many things: features, politics, and personal preference as well as fashion. If you haven't used git on an open source project yet, it's definitely worth kicking the tires. You may discover it's worth switching from your current system.

What version control system do you use? 



Randy Clark uses OStatic to support Open Source, ask and answer questions and stay informed. What about you?



8 Comments
 

Interesting. I have used CVS and SVN, and was considering BZR, but have not looked at GIT.


I like Subversion because it made life a lot simpler in terms of taking regular backups. Same with CVS - I could just back up the entire repository. Is this possible with git? If so, that is good.


0 Votes

Here's an excellent post on git and a good video answering that from the author, Linus Torvalds:


http://hwasungmars.wordpress.com/2007/11/25/journey-to-a-backup-solution...


0 Votes

the peepcode screencast (preview) is terrible.


0 Votes

mercurial!!! simple, fast and convenient


0 Votes

git is doomed to not go very far simply because the author despises any OS that he didn't write so he offers no binaries for other OSs (like XP or OSX). Sure, you can build the binaries from source if you like but that's a strategy for failure. Nobody but the most die-hard geeks will bother. Frankly, I don't think he gives a damn because he wrote it for himself anyway.


If you want something like git that everyone could use, then look at Mercurial. It even has a version of Tortoise written for it, in addition to installers for OSs like XP and OSX. Mercurial has for more support in the OSS community and isn't haphazzardly written.


0 Votes

Git on MSys

http://code.google.com/p/msysgit/


"

If you only want to use Git.

Get Git from the download area. Install it, be happy.

"


Cheers,

Rajesh Duggal


0 Votes

Looks great.


We use a commercial product called SpectrumSCM which combines issue tracking with source control and forces you to tag each change to an issue (instant release notes). It is written in Java and runs on Windows and Linux. So far, so good...


0 Votes

To the anonymous guy who likes trashing Linus:

You obviously have NO CLUE what OSS is about. One guy blazes a trail and other guys come and build onto the system. Someone will come along (and the google code looks like someone did) and make a version for other operating systems. I'm not sure if you realize there are more operating systems than Linux, MS, and OSX.

Open your eyes and be surprised.


0 Votes
Share Your Comments

If you are a member, to have your comment attributed to you. If you are not yet a member, Join OStatic and help the Open Source community by sharing your thoughts, answering user questions and providing reviews and alternatives for projects.