I currently use Git, and am generally happy with it, but I'd like to know more about Mercurial. Does it have any advantages over Git? What are the advantages of Git over Mercurial?
I realize there are already detailed comparisons of the two, but that's not what I'm asking for. I don't want dispassionate information, but rather impassioned (but polite!!!) reasons why you think one is better/easier/faster/smarter/stronger/etc.
Git Is Better for Experienced Users Mercurial depends on your level of technical expertise. Mercurial may be safer for less experienced users, but Git can offer ways to enhance safety (once you know what you are doing).
Git has a powerful and effective branching model. Branching in Git is better than Branching in Mercurial. Branching in Mercurial doesn't refer the same meaning as in Git. Git supports the staging area, which is known as the index file.
One of the biggest advantages of Git is its branching capabilities. Unlike centralized version control systems, Git branches are cheap and easy to merge. This facilitates the feature branch workflow popular with many Git users. Feature branches provide an isolated environment for every change to your codebase.
I have used both Mercurial and git and I vastly prefer hg to git; it just feels nicer. Steve Losh in his blog post The Real Difference Between Mercurial and Git sums up most of my feelings about it. Here are some quotes which I agree wholeheartedly with:
I think there’s still one very, very important difference left: the systems feel very different to use.
I personally find Mercurial’s philosophy easier to work with. It’s easy for me to wrap my head around commands when they’re more modular and less monolithic.
I personally don’t like the index. I feel that git encourages people to check in changesets that contain code which they’ve never tested (or even built) because the index is such a prominent part of git’s workflow.
I've found the index a pain to work with - if I want something like that (and more powerful, too) I'll use mq. In the mean time - why should I be forced to have different types of add
s, etc.? Why should I be forced to use git commit -a
(and have git status
- where is git st
? - show weird info)?
Quite seriously, I personally can attribute the success and wide acceptance of git to nothing other than GitHub. Steve latches onto that, too. How may people have been through this, and "given in" to pressure from git users?
I don’t like using git itself (though it’s far better than SVN or CVS), but GitHub is such an awesome site that I’ve considered switching just to use it.
I'll continue to only use git/GitHib when required to - when I want to make a patch to something that's on there. My own projects will continue to use Mercurial. It feels nicer.
(A) Top 3 real reasons I use Git rather than Mercurial by choice:
(B) Given the above, the top 3 things I like about Git over Mercurial:
(C) The three things Mercurial has for it over Git:
I think that all (most?) of the items in (B) are either a result of me being used to the Git model due to (A) or can be "fixed" in Mercurial through plug-ins. But the fact remains that Git works the way I want it to out of the box, and I can live without any of the (C) items [given that C(1) is rendered a non-issue due to the excellent ProGit book]. And, so, I continue to use Git over Mercurial.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With