Hacker News new | ask | show | jobs
by bengale 1772 days ago
When I’ve done this before the commit messages get listed in the squash commit.
1 comments

The list is useless, it's the contents that are helpful when debugging (and the wip commits just get in the way).
Exactly! Suppose feature A is implemented (commit 1). Then it is discovered that the original implementation breaks feature B, and that is resolved (commit 2). In merge workflows, you have a merge commit on main, while commit 1 and 2 are maintained. In rebase/squash workflows, you have a single commit on main, with both changes. If 6 months later I find that the commit broke some feature C, I really want to know if it was the main change or the compatibility fix that did it.
Right, though usually commit 2 would be placed before commit 1.
True, and that's a better way around it, since then both commits can run and pass the tests.