Getting started with Mercurial

Every developer is using a some version control system. Or at least they should. It has saved me a number of times when I overwrote or deleted something. Nowadays most developers use Git, but I never liked using it.

The first tool I was introduced to was Subversion and I was quite happy with it. A problem is that you always need to have an internet connection to work with a repository. So I started to look at distributed systems. At that time there wasn't a clear favourite system among developers. First i tried bazaar, but I had some issues. This resulted in some code loss. I don't know what went wrong, but loosing code was the opposite of what I wanted.

Next I tried Git. Github had just started. So it wasn't the obvious choice like it currently is. I really couldn't get used to it. The commands felt really counterintuitive to me. I recently witnessed a migration from CVS to Git at a client. And the developers hated it. So it was the confirmation that I am not the only one feeling this way.

So I started to use Mercurial, also know as hg, after the chemical element. And I am still happy with it. It is definitely more elegant than Git. Below are some reading tips, if you would like to get started.

Joel Spolsky wrote a good introduction:
Hg Init: a Mercurial tutorial

Also the book from O'Reilly is available online:
Mercurial: The Definitive Guide

Mozilla is also using Mercurial and their documentation is public:
Mercurial at Mozilla

Branching works differently than in Git. As a matter of fact there is more than
one way to branch in Mercurial. Steve Losh wrote an overview:
A guide to branching in Mercurial

Facebook wrote a blog post on why they chose Mercurial over Git. So that might be worth a read, if you are considering your options.