In brief praise of DVCSs

Sunday, 19 Oct 2008

Since I started using Git, I’ve noticed that I use version control for many more things than I would in the days of using Subversion: it seems to be a lot easier to put everything under version control. But for a while, that was merely a feeling whose reasons I found hard to fathom, then hard to articulate. After recently reviewing the ceremony required by Subversion to establish version control for something, the reason stood out to me clearly: Subversion makes the mental overhead of creating a repository very much greater than any DVCS.

With a DVCS you just say git init or hg init or bzr init or whatever you prefer – there’s no need to pick a location for your repository since it just goes wherever your working copy is. There’s also no need to turn the current directory into a working copy after checking it in initially by checking it right back out, which may in turn require casting a path to a URI (since svnadmin only works locally).

It seems like small potatoes, but when someone turns something that takes five actions and has a free variable into a single action that requires no thinking whatsoever, it changes the quality of the game. You start creating throw-away repositories for the littlest reason because the only decision left to make is whether to create one or not. It’s a classic example of the tyranny of choice.