Revisiting my issues with git, nine years on

Nine years ago, I wrote Git is a Harrier Jump Jet. And not in a good way, then followed it up with Still hatin’ on git: now with added Actual Reasons! Both posts evidently resonated with a lot of people, but also attracted a lot of constructive disagreement.

Prodded by a new comment from MiB this morning, I found myself writing a response that I think is worth reproducing and amplifying here.

The problem with git is that it’s complex, and that is at least in part because it’s trying to some a complex problem.

I don’t think anyone’s even argued that complex problems must always necessarily have complex solutions — there is such a thing as cutting the Gordian Knot. But anything that’s complicated is that way due to a combination of two factors: the inherent complexity of the problem to be solved, and “wasted” complexity that is introduced by a suboptimal solution.

I started out thinking that git-as-solution-to-version-control was mostly the second kind of complexity. It certainly introduces some of that — not all its decisions are defensible — but I have increasingly come around to the perspective that most of the complexity is real, and inherent in the problem we’re trying to solve. That said, people who don’t need to solve the whole problem (multiple teams distributed in time and space, contributing potentially conflicting change-sets to a codebase that must both move forwards into new versions and maintain bugfix releases of older versions) then you don’t need the whole solution.

Git is far from perfect — there are still plenty of occasions when I get a checkout into a state I don’t understand, and end up having to take off and nuke the whole checkout from orbit. But it genuinely is very very powerful (especially when complemented by GitHub and similar tools), and when you need that kind of power it’s genuinely inevitable that you’re going to need to deal with some complexity, just as a food processor is more complex to use than a knife.

(And of course “This should be simple, we don’t need all this complexity, we should just get rid of it all” is exactly the kind of thinking got us Brexit and the current no-deal insanity.)

Advertisements

9 responses to “Revisiting my issues with git, nine years on

  1. I think that Git the plumbing is pretty good. A DAG of commits is an excellent base to build on.

    Git the interface is terrible for anything non-trivial, and I am delighted that there are excellent tools to let me not use it 99% of the time.

  2. It does feel rather as though the various command-line git this and git that commands started life as test-harnesses to exercise the plumbing, and got released into the wild by accident. “Life will find a way.”

  3. @andrewducker My feelings exactly. I swear by Smartgit and rarely have to touch the git command line.

  4. I don’t know git at all. My reaction to what you’re saying is initially, “that sounds like a load of suck. I really don’t like what I’m hearing about.” But thinking for a moment, that was also my reaction to Unix, which was definitely a hate-hate relationship in the early days. But I could see something there and persisted, even just as an intellectual exercise, until I “got it” (it takes me a while to get things: maybe it’s because of the autism, or maybe it’s just because I’m difficult). And suddenly it was all worthwhile, and has been ever since. And in hindsight the alternative (though actually VMS) might have been Windows. *shudder* Was it worth the trauma? In its case, absolutely. But I guess that’s always the pertinent question.

  5. I think the Unix analogy is pretty strong, actually.

  6. I’ve never used this thing called ‘git’. I can imagine there are situations in which it is indispensable. I hope I never find myself in one.

  7. Git at least solves problems that systems like RCS ignores, and systems like CVS amplified the suckage beyond belief. git has a lot of issues, but its fundamental ‘everythings a repo, you can push and pull, and name your branches and tags’ works pretty well. Until it doesn’t :)

  8. “Solves problems that systems like RCS ignores” is the very essence of what’s going on here. It doesn’t solve its problems perfectly, but it addresses them — which is more than RCS or CVS do. This has become more and more apparent to me over the last few years. (It’s nice to still be learning such things in my fifties.)

  9. Its also good they didn’t try to just retrofit a paper bag onto the side of systems like RCS.. it does its job pretty well, being an in-directory solution; now that git exists, RCS nearly has no function at all anymore. CVS tries to be the push-to-remote-repo solution, but it still can’t safely deal with large files or binary files, or ‘holey files’ and other oddballs .. but not dealing well with binary files? Thats unforgivable in civilized society :) Git is like a modern filesystem.. not perfect, and a lot of weird edge cases.. but doing a lot of things right, and you just need a good UI on top (be it CLI or GUI or whatever.)

    All is well until the rebase happens…. :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.