logoalt Hacker News

esafaklast Tuesday at 9:57 PM1 replyview on HN

Besides, they probably shouldn't make PR commits atomic, but do so as often as needed. It's a good way to avoid losing work. This is in tension with leaving behind clean commits, and squashing resolves it.


Replies

gbear605last Tuesday at 10:43 PM

The solution there is to make your commit history clean by rebasing it. I often end my day with a “partial changes done” commit and then the next day I’ll rebase it into several commits, or merge some of the changes into earlier commits.

Even if we squash it into main later, it’s helpful for reviewing.