jonchu's posterous

Pearls of wisdom from ... me (haha)

« Back to blog

DVCS: Why I chose Mercurial over Git

From the very start of my OS class, the TAs have been singing praises
to the awesome glory of distributed revision control systems and,
namely, Git. Thus, when it came time to start what many at CMU
consider to be the hardest project based assignment this university
has to offer, my partner and I both decided we would try out Git. So
off we went, walking down the path to the DVCS world.

After finally finishing my kernel for class, I've decided that to move
away from Git and try Mercurial for the next project. Why? During the
course of development, we quickly found many of Git's strengths and
weaknesses. And the weaknesses aren't things I'm willing to live with.
At least to me, Git's naming conventions for its commands never seemed
to be intuitive or descriptive for the average user. How do you move
between revisions? Not really sure. Git checkout with a bunch of flags
that I will never remember should do the trick. Need to make a new
branch? Try git branch--er... I mean 4 seemingly random Git commands
that don't include the word branch. What about reverting to an old stable
version of the codebase? Side story: before the kernel was due, my partner
and I ran through the codebase documenting anything and everything.
Somehow, through documentation, we broke the build (epic fail).
When we attempted to move back to a stable revision while keeping the
broken branch so we could copy and paste documentation, things went to hell.

What you say? I must be mad. Google can solve all those problems. This
leads me to my second major issue with Git. Its online documentation
is extremely lacking. Not only is documentation for some important
features sparse, the documentation that does exist is rarely ever of
the best quality. Sure, a Git guru could probably use it to do
anything he'd ever want with an RCS. But I'm not a Git guru, and I
don't think I should need to be one in order to use Git effectively.
I'm not looking to become an expert on Git. I'm looking to find a new
tool that can quickly help me make better programs.

After my quick foray into Mercurial, I must say I'm extremely
impressed. Every command within Mercurial is intuitive. Hg update
moves you to the tip of a new repository, hg branch does exactly what
you think it does, and hg revert and rollback work like they should.
Every command in Mercurial seems do what you'd expect. An even
greater plus, Mercurial's online documentation is excellent and a brief
glance at one of the many high quality tutorials can quickly get you
up to speed.

I pay my tribute to Git for being the wonderful tool that introduced
me to the DVCS world. In the future, I almost undoubtedly will run
into a project that uses Git and may even master the ins and out of
the system. For now, however, I'm sticking with what'll help me create
better code now. And that means switching to hg.