Hacker News new | ask | show | jobs
by jasode 831 days ago
>Does git win because of the decentralized, everyone-has-a-local-repo aspect? Or the staging area, which I understand other VCSes don't have? Or just speed or reliability? Or just being in the right place at the right time?

Your questions are actually covering 2 different categories:

(1) Why did (past tense) git win?

(2) Why does (current tense) git have a monopoly of usage now?

For (1), the various theories for git winning mindshare to create an insurmountable lead include technical and social differences:

- Git being faster than Mercurial. It had "cheaper" branches than Mercurial. And some blamed it on Mercurial being built with python instead of Git's C.

- index/staging area

- the Github free tier being more generous than Bitbucket(Mercurial)

- intangibles such as being created by Linus and high-profile usage by the Linux kernel contributors

Google Trends shows that Git+Github almost immediately outpaced Mercurial+BitBucket from 2008:

https://trends.google.com/trends/explore?date=all&geo=US&q=g...

https://trends.google.com/trends/explore?date=all&geo=US&q=g...

For (2) today, you mostly have inertia. Most developers are not going to bother to research and re-evaluate the VCS landscape and make a deliberate choice on any technical merits. Git is already too massively popular so just go with what everybody else is already using and just move on to something else. Even if another DVCS has some technical superior aspects (e.g. Fossil?), it doesn't matter because git is already too entrenched in the ecosystem.

An example of the network effects of (2) is Python's creator Guido van Rossum suggesting the move from Mercurial to git/Github:

2009 choose Mercurial/hg.python.org: https://mail.python.org/pipermail/python-dev/2009-March/0879...

2014 migrate to git/Github: https://mail.python.org/pipermail/python-dev/2014-November/1...

His 2014 suggestion to switch to git isn't based on technical features. It's about using what's the most popular to reduce friction.

2 comments

One more point I'd add to (2): given its massive inertia / network effect, the tooling and the resources are leagues ahead of everything else. I'm using Darcs for a few personal projects and while the core ideas are great, the tooling is just worse. From the ways to customize the diff utilities to use, to integrations with text editors (the vc-darcs module for Emacs is pretty barebones, especially compared to Magit, but even compared to the basic vc-git).
Darcs is a name that always makes me a little nostalgic, it was such an obvious idea of approaching a VC system. Unfortunately when I used it 10+ years ago we did hit the "merge of doom" problem too often.

I was sorry to see it go away, but mercurial took over for a while, and then later I switched to git because everybody else had done so.

> His 2014 suggestion to switch to git isn't based on technical features.

Likewise for the 2009 mail.