Re:Fortunately, I don't squash my commits
by xorcist on Monday October 05, 2020 @12:08PM
(#24689000)
The difference between fixups and squashing is only in how the commit message is generated.
Both are (interactive) rebase operations. Both are established terms in git, and it is probably not very useful to change that nomenclature now.
They're the same technical operation, but they're used in different ways, and it's the difference in use that matters. It's useful to be able to distinguish them. It's never too late to improve our terminology! How long had git diff --cached been around when git diff --staged was introduced?
If you do make them by mistake - and everyone does sometimes, certainly including me - then sure, commit --amend or squash them before pushing them up.
The squashing the article is talking about is collapsing functional, distinct commits into one when merging to the trunk. It would be useful if we had distinct terms for the two kinds of squashing; the git command commit --fixup and its associated interactive rebase operation suggest the name "fixups".