Popularity of Git/Mercurial/Bazaar vs. which to recommend

Going by the number of questions on this site for these three distributed version control systems, it seems like Git either

  • is more popular, or
  • is more difficult (hence requiring more questions), or
  • has more features (hence requiring more questions).
  • Or most probably a combination of the three. (Let's say that popularity on this site equates to popularity at large.) Here are the numbers:

                    | Jun 2009 | Jul 2010 | Jul 2011 | Jul 2012 | Jul 2013 | Jul 2014 | Jul 2015 | Jul 2016 | Jun 2017
        ---------------------------------------------------------------------------------------------------------------
        [svn]       |     2353 |     5323 |     9028 |    12687 |    15587 |    18846 |    21209 |    23037 |    24692
        [git]       |      726 |     3725 |     9225 |    17523 |    27862 |    41478 |    55315 |    71056 |    86958
        [mercurial] |      169 |     1120 |     2765 |     4221 |     5230 |     6030 |     6651 |     7134 |     7524
        [bazaar]    |       50 |      159 |      252 |      351 |      425 |      483 |      506 |      525 |      534
    

    It's not entirely satisfactory having three competing yet largely equivalent open source products to choose from. Personally I use Git and I'm fine with the other two. But when it comes to recommending one system over the others, I'd like to ask: can we start recommending one safely yet?

    Comments from mid-2009 : The recent historical popularity of Subversion is clearly reflected by the number of questions, indicating at least a small tipping of the scales towards Git over the Mercurial or Bazaar.

    Comments from mid-2010 : Look at that huge relative increase in Mercurial numbers. Obviously only two-data points aren't enough to show a trend, but it looks like Git and Subversion are largely entrenched, Mercurial has seen a lot of growth, and Bazaar has remained relatively quiet.

    Brief comment, mid-2011 : Can we just call Git the winner? :) No, I accept the argument that number of questions is not equivalent to popularity. Numbers sure are strong, though.


    Update November 2011:

    Git is now much more mature compared to 2009:

  • smart http is now supported, which means you can offer to your client https protocol to pull/clone and push, with authentication able to interface with an LDAP (important for user in an enterprise)
  • A mature authorization layer now exists with Gitolite, which means you can provide isolation for "confidential" repository (again, important for large companies).
  • The Windows support which was already there in 2009, is still going strong, and TortoiseGit is quite stable
  • The integration with IDE like Eclipse is in progress (most of Eclipse projects are now on GitHub)
  • However, installing Git in a centralized environment is not trivial:
    See "Distributed Version Control Systems and the Enterprise - a Good mix?"


    One point consistently missed is:

    they are different in their nature.

  • SVN is a REVISION system (it stores branch and tag through cheap copy only! Merge support is not very efficient), and it is centralized.
  • Mercurial or bazaar are FILE VCS (they store versions of files), and distributed.
    Arne Babenhauserheide amends that for Mercurial by pointing out that Mercurial's History model tracks content-changes , with file-paths re-used in the storage layer to optimize filesystem access.
  • Git, and that is very hard to grasp, is a CONTENT VCS (it stores delta of content, not the file itself: two files with the same content will be stored only once)
  • That means:

  • if you have a simple merge workflow , in a single development location, stick with SVN
  • if you have several development places, a distributed VCS is more adapted.
  • if you have a complex merge workflow, any modern VCS is better than SVN which struggle to keep merge informations at the right places for years. It then depends on the tools (Mercurial has a more advanced Windows support for instance)
  • if you have mainly text file and not too-large binary files, Git is excellent, provided you are aware of its limits .

  • Going by the number of questions on this site for these three distributed version control systems, it seems like Git either

  • is more popular, or
  • is more difficult (hence requiring more questions), or
  • has more features (hence requiring more questions).
  • About SCM popularity -- see the following StackOverflow question: Are there any popularity / usage statistics available for the Free RCS/SCM/VCS systems?. Here we have questions like what set of ignore files to use for specific kind of project, which are SCM agnostic, but are asked for Git (and using 'git' tag), because it is what person who asked question use.

  • About Git being more difficult (and therefore having more questions about on SO) -- certainly Git has steeper learning curve. It also uses few (quite) unique concepts, like the staging area (the index), or all branches being equal, which are responsible for its power, but might be difficult to get right at first (especially if one comes from other SCM). Also Git UI is not completely consistent (although it gets better), because it was grown rather than developed; which is responsible for its power, but might lead to suboptimal user interface.

  • About Git having more features -- you would have to check how many SO questions are about advanced / uncommon features of Git. You should be aware however that open source projects borrow ideas from one another, or have similar features developed independently: one example would be finding bugs by bisecting (searching) history for commit that introduced the bug which was (as far as I know) developed first in Git, and then implemented as plugin in Bazaar, and first extension and currently core functionality in Mercurial. Another would be interactive selecting fragments of changes to commit, inspired by Darcs behaviour. Yet another would be Git's bundle idea, borrowed from similar concept in Mercurial.

  • Yet another possibility of source of larger number of SO question might be lack of good documentation ... although it gets better nowadays with Git User's Manual (distributed with Git) and Git Community Book (found on Git homepage). Still there is this persistent meme that Git has worse documentation than, say, Subversion with its Version Control with Subversion (also known as svnbook) and Mercurial: The Definitive Guide (also known as hg-book)... and people do not read documentation before asking question on StackOverflow, sometimes.

  • It's not entirely satisfactory having three competing yet largely equivalent open source products to choose from. Personally I use Git and I'm fine with the other two. But when it comes to recommending one system over the others, I'd like to ask: can we start recommending one safely yet?

    Well, Git and Mercurial were developed independently starting at nearly the same time in the response of terminating free license for BitKeeper for use by Linux kernel developers, as a replacement for it. Subversion was out of the question as centralized SCM, with lack of support (then) in core for merge tracking; this made it completely unsuitable for the largely distributed development model of Linux kernel. Bazaar was probably too slow (at least then), and a bit on centralized side (I guess).

    Git is more powerfull (in my opinion), Mercurial is simpler (in people opinion) and a bit more portable (Python); Git is scriptable and is based on data model allowing independent reimplementations (see eg JGit, git written in Java), while Mercurial has Python bindings for writing extensions, and is based largely on API allowing change of underlying repository format (revlog - revlog-ng)... but that is just my supposition. They fill slightly different niches.

    Besides isn't having a choice considered good thing? We have KDE and we have GNOME and XFCE (and other window managers and desktop envirionments); we have Emacs and Vim (and other programmer's editors); we have rpm-based (eg Fedora Core, Mandriva, SuSE) and deb-based (Debian, Ubuntu) and tgz-based (Slackware) and source-based (Gentoo) distributions; we have KWord, AbiWord and OpenOffice.org... and we have Git, Mercurial and Bazaar.


    I use and recommend mercurial

  • rather than subversion because it supports distributed development. I can work on several machines and commit locally. You can't do this with subversion, at least not without somersaults like additional repositories
  • rather than bazaar because bazaar's windows support is ... well.
  • rather than git because it is a) simpler to learn and use and b) windows support is much better
  • 链接地址: http://www.djcxy.com/p/45722.html

    上一篇: 如何让git log显示像svn log这样的文件名

    下一篇: Git / Mercurial / Bazaar的流行度与推荐