logoalt Hacker News

locknitpickertoday at 4:26 AM1 replyview on HN

> What's up with the fix commits?

They shouldn't show up in the commit history. In a PR, you merge them in the commit that they actually fix. Otherwise when you use git blame to get the context of why a line of code was changed, all you see is a useless "fixup" message that is worse than having nothing.

Anyone can do better than a fixup commit. And doing metter means merging them into the actual commits that are fixed.


Replies

gbalduzzitoday at 5:46 AM

> Otherwise when you use git blame to get the context of why a line of code was changed, all you see is a useless "fixup" message

Isn't this solved if you squash the commits when merging the PR? I personally don't care that much about the commits inside a PR, the are just temporary because when a PR is merged they are squashed and you only get one commit for the whole feature on the main branches

show 4 replies