logoalt Hacker News

masklinntoday at 5:24 AM1 replyview on HN

It’s important to note that not all history is worth keeping, and keeping a dozen commits titled “fix” fixing build / CI errors from the original changes are a lot worse for bisecting than squashing it all into just one.

I very much prefer keeping histories by default (both my personal workflows and the tools I build default to that) but squash is a valuable tool.


Replies

lmmtoday at 6:59 AM

> keeping a dozen commits titled “fix” fixing build / CI errors from the original changes are a lot worse for bisecting than squashing it all into just one.

How so? When I bisect I want to get down to a small diff, landing on a stretch of several commits (because some didn't build) is still better than landing on a big squashed commit that includes all those changes and more. The absolute worst case when you keep the original history is the same as the default case when you squash.

show 1 reply