38

It's 2012! Mercurial and Git are both still strong.

I understand the trade-offs of both. I also understand everyone has some sort of preference for one or the other. That's fine.

I'm looking for some information on level of usage of both. For example, on stackoverflow.com, searching for Git gets you 12000 hits, Mercurial gets you 3000. Google Trends says it's 1.9:1.0 for Git.

What other empirical information is available to estimate the relative usage of both tools?

ana
  • 389
  • 1
  • 3
  • 3
  • 65
    Stackoverflow hits may indicate "difficulty", not "popularity". –  Jan 06 '12 at 18:44
  • 6
    Git wins in google trends, github wins over bitbucket, BUT - afaik many commercial companies prefer Mercurial over Git, so its quite possible that while Git has more people using it, Hg has more money bet on. – c69 Jan 06 '12 at 19:00
  • What is the reason companies prefer Mercurial over Git? – ana Jan 06 '12 at 22:36
  • 11
    Reasons like these I would suppose: http://stackoverflow.com/a/892688/224087 or http://ericsink.com/entries/hg_denzel.html or http://stevelosh.com/blog/2010/01/the-real-difference-between-mercurial-and-git/ I too think Mercurial is more polished and easier to approach. Tool quality is also a factor. The Mercurial experience is clearly better than Git's on Windows. Also, we use FogBugz and Kiln, which make a very nice integrated bug/task tracker and source code control package. For personal code, bitbucket had better pricing (I could get away with free plan, where I could not on github) – quentin-starin Jan 06 '12 at 23:29
  • 1
    @ThorbjørnRavnAndersen Totally agree. I find git to have quite the learning curve where mercurial seems to have a less steep curve. Its hard to judge something on the metrics of hits...Who knows. Perhaps the most popular tool is the one with the lowest hits because nobody needs to ask for help :) – Rig Jun 26 '12 at 21:17
  • @ana http://dictionary.reference.com/browse/git doesn't help – jk. Jun 26 '12 at 21:24
  • why do you even care? – DeadMG Jun 26 '12 at 21:41
  • @Rig And here I always thought that SO had far more C# questions because C# is more popular on SO than C++. Nope, it's just that C# is far more difficult! – Dan Moulding May 09 '13 at 18:16
  • As a company, we want to use the same tool across entire team that consists of programmers & sales/marketing + staff. Mercurial is preferable because the latter find it easy to use. – user Nov 18 '13 at 04:02

2 Answers2

20

Ohloh

In a similar style to my Git vs. SVN answer, Ohloh has been crawled (only) three times by the Internet Archive's Wayback Machine, but July 2011 is unreadable:

August 2010

  • Git: 26,485 repositories (11.3% of total)
  • Mercurial: 2,548 repositories (1.1% of total)
  • Ratio: 10.4:1.0

May 2011

  • Git: 116,224 repositories (35.3% of total)
  • Mercurial: 3,753 repositories (1.1% of total)
  • Ratio: 31.0:1.0

February 2012

  • Git: 124,000 repositories (26% of total)
  • Mercurial: ?

June 2012

  • Git: 134,459 repositories (27% of total)
  • Mercurial: 11,238 repositories (2% of total)
  • Ratio: 12.0:1.0

October 2013

  • Git: 238,648 repositories (38% of total)
  • Mercurial: 17,145 repositories (2% of total)
  • Ratio: 13.9:1.0

April 2014

  • Git: 238,648 repositories (38% of total)
  • Mercurial: 17,628 repositories (2% of total)
  • Ratio: 13.5:1.0

Eclipse Community Survey

Another source of data is the Eclipse Community Survey. Git values below are for Git/GitHub.

2009 (pdf)

  • Git: 2.4%
  • Mercurial: 1.1% (Note: Hg listed under "other" in 2009 report, but itemised in 2010 report)
  • Ratio: 2.2:1.0

2010 (pdf)

  • Git: 6.8%
  • Mercurial: 3%
  • Ratio: 2.3:1.0

2011 (pdf)

  • Git: 12.8%
  • Mercurial: 1.1%
  • Ratio: 11.6:1.0

2012

  • Git: 27.6%
  • Mercurial: 2.6%
  • Ratio: 10.6:1.0

2013

  • Git: 30.3%
  • Mercurial: 3.6%
  • Ratio: = 8.4:1.0

2014

  • Git: 33.3%
  • Mercurial: 2.1%
  • Ratio: = 15.9:1.0

Summary

These appear to show that, of the open source repositories registered on Ohloh, and of the developers using Eclipse, Git is a good order of magnitude more popular than Mercurial.

Hugo
  • 3,669
  • 2
  • 25
  • 40
8

I think other than Google trends or SO questions (which as the comments above point out, might indicate curiosity or difficulty rather than usage), your best bet is to look at statistics where they are available, and weight them by source (how you do that is likely suggestive, though).

You can see the distribution of ALL version control systems on projects indexed with Ohloh.

Debian Popularity Contest shows a graph for stats for DVCS packages.

And it's a little outdated, but the GNOME DVCS Survey Results are interesting.

When it comes down to the numbers, I think Ohloh is the most general audience, so I'd go with that, personally... still a LOT of people using SVN and even CVS, though.

In terms of open source software, where the important issues are coordinating broadly distributed and asynchronous teams, Git is the hands-down winner. Especially when you look at Wikipedia's comparison by popularity of open-source project hosting sites (based on numbers of GitHub (git) vs. BitBucket (Hg)).

Jason Lewis
  • 2,113
  • 13
  • 18
  • 8
    Not that I think you should choose a DVCS based on popularity. – Jason Lewis Jan 07 '12 at 02:59
  • 3
    Actually, I think popularity is an excellent reason to choose a version control system because of the distributed nature of the tool. The network externality effects give the more popular tool vastly more value if you plan to contribute to projects with other participants. – Ana Jan 07 '12 at 08:52
  • I agree for open source projects. If you want to have your primary DVCS known to the greatest number of potential contributors, Git is the de facto choice. Internal to an organization... you need to go with factors such as the size of your team, institutional support, etc. – Jason Lewis Jan 07 '12 at 19:45
  • 6
    As I suggested [here](http://programmers.stackexchange.com/a/77476/22493): "You should use `git` when a *project or community you want to contribute to* uses `git`, and use Mercurial when *they use* Mercurial. It may seem obvious, but the community is more important than the tool." – Mark Booth Jan 18 '12 at 12:58
  • 1
    It's not all technical - consider that a business needs to recruit new programmers to the team to support growth and replacement. Choosing tools (DVCS is just one of many) that are well known means that a new recruit is more likely to be familiar with it. Also a more popular tool (Particularly OSS) will likely get more resources and effort and over time improve faster. – mattnz Jun 26 '12 at 21:51
  • that’s the million flies argument. It is valid to some degree - and leads to horrible group decisions when all follow it. – Arne Babenhauserheide Dec 18 '13 at 16:22