hginit: a Mercurial tutorial

Joel Sposky has a nice tutorial out for Mercurial (hg). I’ve mentioned that we’re moving away from Subversion (svn), and one of the things about this tutorial that I like is that Joel specifically addresses how being an experienced svn user can make it harder to understand how to best use hg. Situating this within some common coding work models helps illustrate how to use hg well, and where hg offers improvements over svn (and the default use models svn promotes). This is a great introduction to hg, whether you have svn experience or not.

Joel also suggests an alternative repository scheme to the more complex git model I described last month. That’s one of those issues that are often not mentioned in introductory tutorials, but since you establish a repository structure early, it’s actually quite important to get it right the first time.

The other thing about this tutorial that I liked was the way that Joel is monetizing his own mistakes. He kicks off the tutorial like this:

When the programmers at my company decided to switch from Subversion to Mercurial, boy was I confused. First, I came up with all kinds of stupid reasons why we shouldn’t switch.

And all the kool kids think: that Spolsky guy. Of course he wouldn’t get hg. What would you expect from a Microsoft stooge?

But look at what he’s got us reading. He’s leveraged his experience learning hg not just into an entertaining tutorial, but into something that’s valuable to his business. This is not a typical half-assed web tutorial. It has its own domain. He’s getting folks excited about using hg and switching away from svn. And what’s that funny looking bird in the corner? Oh, Fog Creek happens to be launching a commercial version control system based on hg? Gee, you don’t say…