Original URL: http://www.theregister.co.uk/2009/01/21/git_gaining_ground/

Open-sourcers get with the git

Sucking from the teat of Linus

By Ted Dziuba

Posted in Developer, 21st January 2009 21:48 GMT

There was a time when the Linux community used BitKeeper as its source code control system, after switching from the open-source CVS. But then Samba developer Andrew Tridgell figured out you could telnet to a BitKeeper server, type "HELP," and get a list of commands. Upon hearing of Tridgell's daring hack, BitMover - the company that maintains BitKeeper - got all license-revokey on the community, changing the terms of the agreement and demanding that Linux developers start paying for its software.

There were other free source control systems available, and the popular one was Subversion, which was billed by its creators as "CVS done right." If you've never used CVS, the dark humor in that statement is that it doesn't make sense. Labeling something "CVS done right" is about the same as labeling something "a urinary tract infection done right.” Many developers, Linus included, find CVS and the like completely unacceptable.

Now, the Legend of Linus is part truth and part mythology. Nobody really knows where the facts end and the tall stories begin. But one common theme in all of them is that Linus has the power of many men. While that multiple is up for debate, the editorial staff here at The Reg has decreed that Linus has the power of ten. It's a conservative estimate, but it keeps our fact checkers happy.

With the power of ten men, Linus reacted swiftly. Rather than cry about it like a little bitch, he created his own source control system called git. In a self-deprecating style that only a developer on Linus's level could pull off, Linus said, "I'm an egotistical bastard, and I name all my projects after myself. First Linux, now git.”

(We Americans don't really get the joke, because while “git” is British slang for a worthless person, we have come to acknowledge the fundamental law of British insults: don't be insulting).

Git, which works very differently from other source control systems like CVS and Subversion, took the freetard world by storm when it came out. Many enterprise developers just saw git's popularity as open source programmers suckling from the teat of Linus, but it kept growing. Programmers started to use git for their side projects and got hooked.

Git is gaining traction because given all other source control systems out there, git is the superior technology. One of the most compelling features is the cheap, local branching. With git, it's very easy to branch your entire codebase, try out some new feature or development path, and either merge it to the main branch or cast it aside like an unwanted child.

Plus, since git doesn't need to run from a central server, nobody will be able to look at your branch commit logs and see the atrocities you've committed. It's only when you're sure your code is ready for public consumption do you push your local repository to the remote one, so that other developers can admire the code you've written.

Developers will almost always select the best technology, and management must be dragged along kicking and screaming. It's no surprise that while git is making some headway in the enterprise, sometimes it's very under-the-radar and slow going.

Git with the program

Git's entry into commercial software development started at companies where there wasn't a whole lot of enforcement around source control. Here in Silicon Valley, we see standardized policies for code management as something that's only for losers who waste time creating things like business plans. For example, Facebook allows developers to use whatever system they are comfortable with.

“We do have a bunch of folks using git, and it’s completely sanctioned,” says Aditya Agarwal, Director of Engineering (...bitch) at the social networking company. "The general viewpoint is that [Subversion] is easier for beginners, but git has a more powerful toolset (but has a much steeper learning curve)."

At other shops, git isn't so sanctioned. Many software development companies have a central repository for all their code, and it's usually something like Subversion. All developers must commit and checkout from this single Subversion repository. The developers of git, recognizing this pain point, created a tool called git-svn, which allows you to maintain a local git repository but synchronize it with a remote Subversion repository.

You can use git to manage all the source code on your machine, and to keep the PHBs happy, commit your finished product to Subversion without actually using Subversion. This "guerrilla git' movement is springing up around the world, as developers see the productivity boost they can gain, but don't want to undo it with a productivity loss in convincing the company to officially switch to git.

Some shops are making the move, though. "In 2008, we saw a lot of companies making the switch. We expect all of the 2009 switchers to dwarf that number," says Tom Preston-Werner, co-founder of GitHub, a profitable company that provides commercial git hosting and training. “We've done training for the Android team at Google, for WhitePages.com in Seattle, and we're about to do a session at Qualcomm.”

Preston-Werner explains that, “Moving years and years of SVN or CVS commits to a git repository is tricky, but we're helping to make that transition simple, and a lot of companies are showing a keen interest in our expertise.” So while there may be an initial cost incurred by switching to git, it appears as if the benefits of it far outweigh it.

So, if you're a developer and you haven't seen git before, there's a good possibility that you'll get a first hand demonstration when it starts to invade your company. If you like it, chances are it will help you get more work done in less time. You can use that spare time to start a company that makes a living out of helping other companies switch to git.

The way we hear it, that will be a pretty good business. ®

Ted Dziuba is a co-founder at Milo.com You can read his regular Reg column, Fail and You, every other Monday.