Is git really better than X?
The DVCS craze drives me nuts, especially with regard to git. The big plusses of a DVCS are that it's fast, branching is local and cheap, and it's distributed (i.e., no central repository). Joel Spolsky started gushing over git and Mercurial (hg) not too long ago, and then even built a SaaS app for hg. Everywhere you turn, someone's going off about how great git is. Even the folks running the framework I use the most, Drupal, were not immune to the hype. Maybe it means I should turn in my geek card, but I'm just going to say it: git is the Emperors New Clothes.
I've used hg extensively and git fairly regularly, and there are some things I really like about DVCS. It's true that branching is fast, and it doesn't depend on the network. I really, really like that. It makes per-feature-branching almost seamless, and I dig it a lot. Before hg and git I worked almost exclusively in SVN, and branching was... difficult, to say nothing about the consequent merge. DVCS it lightyears better.
Everything's distributed to anyone who clones now, instead of living in one central repo -- at least, that's what the sales guy down at the lot said. In reality, you're pushing your commits somewhere like Github or Kiln, and any work you do that's not pushed out may as well not exist. When's the last time you cloned or fetched from your neighbor's laptop? Never, that's when. Everything lives in Github, and if your laptop's hard drive goes up in smoke, then the work you committed but didn't push is gone -- just like with traditional version control. Not exactly game-changing.
The Pain of Branching
Branching, while fast, is strange in git. I don't always see all my branches in git log --all. I think you only see branches that are tracking the origin, but I thought the point is that you do all your work locally...? What's the point of only seeing remote branches in the log? Speaking of tracking, how do you push a new branch and make sure you always pull from the remote copy as well if you didn't create the branch to track origin? Hg actually was really good at this: hg push --new-branch and you're done.
The result here is that I never feel like I've got a solid grasp of where, exactly, I am in relation to my branch point. Once in a while I'd get similarly lost in hg and push up to Kiln, and take a look at Kiln's awesome train tracks display to pinpoint exactly where I was.
Why Git is Better than What?
A lot of people harp on how fast git is. In fact, the author of "Why Git is Better than X" went so far as to encourage the reader to try for himself:
These numbers are really not difficult to recreate, simply clone the Django project in each of the systems and try out the same commands in each.
git clone git://github.com/brosner/django.git dj-git
hg clone http://hg.dpaste.com/django/trunk dj-hg
bzr branch lp:django dj-bzr
svn checkout http://code.djangoproject.com/svn/django/trunk dj-svn
Sounds good, let's give it a shot:
$ time svn co http://code.djangoproject.com/svn/django/trunk/ django-svn
Checked out revision 17495.
$ time git clone https://github.com/django/django.git django-git
Resolving deltas: 100% (104179/104179), done.
Huh. In fact, git's performance on truly large repos is pretty dismal, to the point where Facebook's taken to the message boards trying to figure out what to do. The git community's answer so far has been "you should break out your code to multiple repos." Nice.
The Learning Curve
All that aside though, by far my largest complaint -- and this is git-specific -- is the learning curve. I know there are some folks out there who are ridiculously good at bending git to their will; Ben Hoskings' Advanced Git screencast is a great example of are-you-a-wizard levels of git usage. At this point, I've all but given up all of that. I've actually just installed the gitflow extensions and called it a day because I'd rather spend my time doing Actual Work than trying to learn the arbitrary conventions of the flavor-of-the-month vcs. It honestly shocks me that I don't see more vocal complaints about this, but I think that's because most git users fall into two camps: those that work on solo projects and perhaps occasionally merge a pull request through github, and those like Ben Hoskings who are just wizards. Git doesn't leave a lot of room for the middle ground. I've personally known two very strong developers who successfully used git solo just to have it blow up in their face as soon as they started collaborating.
Bottom line: I'm feeling the pain right now. Maybe in a year I'll join the rest of the world and write another post about how great git is, who knows. But from where I sit today, it seems impossible that the hordes of people wringing their hands over the awesomeness of git have it right. Maybe I look like a fool for saying it, but I can't see any clothes on the emperor at all.