Hacker News new | ask | show | jobs
by bravura 496 days ago
Please don't jump on me:

Am I the only person in this world who is an accomplished engineer and thinks commit messages are worthless? That if I want to roll back or dissect, I do it at the PR and not individual commit level?

The need for very accurate comment messages occurs so rarely in my workflow that the value of crafting them correctly is not there.

I ask honestly: Am I missing something here? Why? Is it something peculiar to my workflow I'm missing?

4 comments

In my experience, most of the value in commit messages isn't in rolling back and such, but in trying to understand history. At day job, I work on a product where some of the code is around two decades old, so you bet there's no one around who you could ask about it. Many of the problems that were solved at the time are solved for free out of the box with modern tooling, but you won't know if that's the case unless you know what problem a commit was fixing to begin with. You can read the diff, yes, but it won't tell you the why and that's what commit messages are for.
I think a lot of people here maybe haven't used a PR + squash merge flow? Because I agree with you, when I'm doing operations on git history I just see the PR title from the squash merge. Squash merge lets the PR be the atomic unit, so commit messages don't matter as much.

But if I read these comments as "I wouldn't let an AI write my PR description", I strongly agree.

It depends on your workflow, ofc.

If you run the kind of shop where your master branch is all merge commits, commit messages are useful.

Working in production and fixing bugs I find them totally invaluable.