top | item 46804818

(no title)

rickz0rz | 1 month ago

What's the grief with squashing commits? I do it all the time when I'm working on stuff so that I don't have to expose people to my internal testing. So long as the commit(s) look fine at the end of the day, I don't see what the deal is there.

discuss

order

zenoprax|1 month ago

Seems like both "show your working" and "make it easier for us to review" are the reasons. Seems reasonable to me.

"Commit 1: refactor the $THING to enable $CAPABILITY"

"Commit 2: redirect $THING2 to communicate with $THING1"

"Commit 3: add error handling for $EdgeCase" --- long explanation in commit body

A single commit with no commentary just offloads the work to the maintainers. It's their project so their rules.

NoGravitas|1 month ago

It's possible to both over-squash and under-squash. You want each commit to do one thing (conceptually), and if you make a lot of in-progress commits, you do want to squash those. But squashing a bunch of related "things" into one commit is too much. The art is in recognizing what one "thing" is.