3 ms·
When squash merging, all commit messages are added to the extended description in the editor, which makes it far easier to remove useless comments and add in an
by noptd 5y ago
When squash merging, all commit messages are added to the extended description in the editor, which makes it far easier to remove useless comments and add in any necessary info as needed. All of that context can then be viewed via git show and other commands, while keeping the base branch's history linear and readable in the process.
I don't see a problem with squash merging, especially as a point of policy. It's been the best of both worlds in my experience.
- throwawaylinux 5y agoWhich are the two worlds it is the best of? Not the regular merge, because the best of that world is that you have individual commits that you can reason about and bisect. Unless your branch history is full of junk, unfinished commits, etc. But in that case the policy should be to not publish such branches (or at least only publish them as WIP / scratch branches which will get cleaned up properly and rebased before upstream merge).
- u801e 5y agoBut they also lead to commits that affect a lot of lines and files and are much harder to revert without conflicts.