(no title)
diek | 2 years ago
The commit information I see when telling teams to squash their branches on merge is not valuable.
* "fixing whitespace" * "incorporate review comments" * "fix broken test" * "fix other broken test"
(note, the broken tests were broken by the changes in the PR)
As soon as that PR is merged those commits are worthless. And there are branches with dozens of those "fixing X" commits that would otherwise pollute the commit graph.
gray_-_wolf|2 years ago
Things like this should not be standalone commits though, they should be incorporated into the previous branch by amending the original work. It takes some effort to have a useful git history, it does not just happen on its own.
lesuorac|2 years ago
noahtallen|2 years ago
IMO, this is a lot simpler and easier to do than rebasing your branch to have a flawless history.
sodapopcan|2 years ago
Having whitespaces mucks up commit, causing you to lose focus of what's actually important.
I have `git blame` aliased to `git blame -w` which ignores whitespace-only changes.
You can also reblame when you come across this formatting commits.
trevor-e|2 years ago
dieselgate|2 years ago
lelandfe|2 years ago
diek|2 years ago
This assumes a branch being merged in represents one logical change (a feature/bugfix/etc) that is "right sized" to be represented by one commit.
26fingies|2 years ago