| I've been using Mercurial for a few years and am now turning to git (one week in, so I won't say much about it) for a very specific and fundamental reason: short lived local branches. Say you have a repository, fix a few bugs on it, and now you want to work on a crazy feature. What you need is a short lived local branch, because you don't know if crazy feature even makes sense. Unfortunately, there is no built in way to do this in hg. [1] Deleting a branch is not a fundamental concept in hg, and so the advice is to create a new local "clone" of the entire repo. [2] Great, now you have to change the config files for your dev environment to point to a new folder just so you can test out crazy feature. Also, by default all your branches get pushed (although hg will complain about creating remote branches). In practice, all this turned "branching" into an expensive concept in my mind. That's bad, very bad. I still prefer the hg elegance and ui to git -- even the output of "hg st" vs "git status" tells a great deal about the philosophy behind both. However, I think hg got branching wrong and that is a fundamental flaw that no amount of elegance at the UI level can compensate for. I remember when I was making my first choice between hg and git and the advice was "they're pretty much the same, pick one." I think that advice is incorrect based on what I've said above. [1] http://mercurial.selenic.com/wiki/LocalbranchExtension
[2] http://mercurial.selenic.com/wiki/PruningDeadBranches |
If these short-lived branch will be merged back shortly. Bookmark is another alternatives.
[1] http://mercurial.selenic.com/wiki/MqExtension [2] http://mercurial.selenic.com/wiki/BookmarksExtension