Dave Gill

The Commit Message That Says It All: 'No Idea of the Changes Just Cleaning Up'

'No idea of the changes just cleaning up uncommitted stuff'

I actually wrote that. As a commit message. And pushed it.

And honestly? I think it's one of the more truthful things I've ever put in a commit message.

We've all got them. The commits that show the gap between how we think we should work and how we actually work. The ones that sit there in the history like a confession. Mine just happen to be a bit more honest than most. Right next to it in the log is another one: 'Forgot to commit my last post on the rss-feed'. A double bill of git shame.

The thing is, I know what good commit messages look like. Conventional commits, present tense, imperative mood, scope in brackets, the whole thing. feat(auth): add OAuth2 token refresh logic. I've read the articles. I've nodded along. And then at eleven o'clock on a Tuesday evening I've got a pile of half-finished changes, a working tree that looks like spaghetti junction, and no memory of what I actually did three days ago. So I write 'cleaning up' and hit push.

The honest version of most commit histories looks a lot like mine. Bursts of fix: actually fix it this time and wip and temp and the occasional revert: oh no. The tidy version you see in open source repos has usually been rebased and squashed into something presentable. The real version, the one where you were actually figuring things out, looks messier.

I'm not saying good commit messages don't matter. They do, especially when you're six months out and trying to work out why something changed. But I think there's something a bit performative about the way we talk about git hygiene. As if the quality of your commit messages is a measure of the quality of your thinking. Sometimes good thinking is messy. Sometimes you go down three wrong paths before you find the right one, and none of those wrong paths deserve a well-crafted commit.

What bothers me more than my terrible commit messages is that I apparently forgot to commit an entire blog post. That one stings a bit more. The whole point of committing things is so you don't lose them. But there it is in the log, a reminder that I was clearly context-switching between too many things and just... forgot.

I'm not sure there's a neat lesson here. Maybe it's just that the gap between best practice and actual practice is wider than most people admit out loud. And occasionally it's worth being honest about that rather than pretending your git log looks like a textbook example.

Mine definitely does not.