logoalt Hacker News

jxftoday at 3:25 AM9 repliesview on HN

> No one is ever going back and reading individual commits.

I violently disagree with this.

At a minimum, when I review PRs I look at the commit history to understand what's up. If the path that was taken to commit this is full of "oops" and "fix" messages, it's an immediate reject for me. The commits tell the story and it's a kindness to your human reviewers to not make them work harder to understand the point you're trying to get across.


Replies

ozimtoday at 6:19 AM

But parent wrote:

Just squash everything before merging and call it a day.

He didn’t write „leave a mess”. So it feels you wrote knee jerk comment or just writing whatever you wanted to write disregarding whatever was written.

GrandfatherTECHtoday at 3:44 AM

What's up with the fix commits? Maybe I misunderstood you, but there ain't nothing wrong in fixing stuff you offer in your PR. And there can also be multiple commits even before the PR while you're developing your PR.

show 1 reply
nltoday at 3:30 AM

> If the path that was taken to commit this is full of "oops" and "fix" messages

great way to encourage people to rebase then!

fcarraldotoday at 3:39 AM

Mine aren’t full of “oops” and “fix” messages, because I squashed them.

show 1 reply
JohnMakintoday at 4:31 AM

yea I look at commits several times a week at least, especially when commits are tied to a ticketing system/project it helps a lot going back months later on a large codebase going “how/why did this change happen”

I do tend to squash or make my entire change in one commit though so maybe I misunderstood your comment. If I have a fix commit often I’ll just tag a separate PR/ticket to keep the change history/change control clean

InvertedRhodiumtoday at 3:52 AM

Depends what the git history is supposed to show. Personally, I prefer people to leave their mistakes and reversions - though I'd require more description messages than "oops" or "fix", something that explained why it was being reverted or swapped out would be the minimum.

Sometimes you try things one way and they don't work out, so you go in a different direction. Capturing why this happened and when can go a long way towards explaining downstream decisions that might seem confusing to someone with a fresh perspective.

show 1 reply
gofreddygotoday at 4:17 AM

Oh that is such a bad heuristic ! The commits and history of how a PR was put together is no indicator of the quality of the PR or the thought process that led to it. Thats the equivalent of rejecting a (handwritten) essay for having too many corrections. ridiculous.

The code is all that should matter. Maybe comments for being nice to others and my future self. thats it.

show 1 reply
bobbylarrybobbytoday at 3:35 AM

Do you really care if someone forgot to format before committing? They can always squash and push locally if they need to.

show 2 replies
danieltanfh95today at 3:51 AM

NGL AI usage is driven by friction in presentation and communication over petty details.