Re:Fortunately, I don't squash my commits
by spdionis on Monday October 05, 2020 @02:31PM
(#24690540)
You are definitely correct. People who argue against squashing have not worked on 10+ years old actively developed repositories, or in big enough teams.
A commit is a change. A change has a ticket. A ticket is a small piece of work that does not result in 3k changed lines.
This ensures that the change rationale is fully documented and easily identifiable.
Nobody needs those "fixed typo" commits. Nor the "implemented function A" commits. What IS the change that you're doing? What functionality? That's the most comfortable commit granularity to debug imho.
Re:Fortunately, I don't squash my commits
by mixmastamyk on Monday October 05, 2020 @04:25PM
(#24691628)
Agreed, I regularly add comments later as well. Understanding often comes after the code works.
I could obsessively fiddle with every commit like an artesenal snowflake, or I could click the squash checkbox on the request.
I suspect there is a pattern in the comments here. People who work on small teams with granular repos that, individually, don't see a lot of daily activity think squashing is bad and erases valuable history. People who work with large repos that see high commit velocity (like a monorepo) think squashing (at least merge squashing) is beneficial and don't see the loss of information as problematic because it's hard to access it in the first place. Maybe I'm just projecting my own opinions on this; I'd like to hear perspectives that conflict with my assumptions.