Liam White
Think twice before squashing your commits

There is an art to squashing commits. Actually, there is an art to making commits in the first place, which includes tasteful discretion on when a fix should be squashed, but that is perhaps beyond the scope of this post.

Ideally, a patch series has a collection of commits that combine to make one overarching change, though I understand that it's not always possible.

In practice, I don't see this happening. Revising your existing patch series to include new fixes instead of just tacking them on seems to be a bit of a lost art. I see it all the time when pull requests are squash-merged with many large commits followed by a number of small fixes.

Eventually, those commits that you squashed down in the pull request box are going to be gone forever. Unless you saved a copy in a branch somewhere, their only memory will be as a bulleted item in the commit message.

Speaking as someone who has been burned trying to bisect regressions through commits squashed in this way, all I'm saying is, be sure that this is what you want.