2 ms·
> Why would you do that, in general? The main purpose is to maintain a clean set of commits. So rather than having a history like: Add method and unit te
by u801e 8y ago
> Why would you do that, in general?
The main purpose is to maintain a clean set of commits. So rather than having a history like:
Add method and unit tests
Update version to 1.2.3
Fixed issue in method
Fixed syntax error
Addressing review comments
you only have the first two commits.
> That seems needlessly hostile to reviewers
Why would doing something like this be considered hostile? The problem here is the tool used for reviewing code, not the submitter or reviewers. Other review tools have had the feature of viewing the diff of the branch across rebases for quite some time now.
The only other alternative is to rely on the submitter to make sure they squash the amendments they make into the correct commit. That in itself is more difficult after making multiple commits of that nature. What usually happens in that case is that those commits end up as part of the master branch. This makes it more difficult to revert certain changes because they're split across multiple commits and it also makes it more difficult to track down the source of a bug. It also makes it more difficult to see which commit was responsible for a given change when using git blame.