3 ms·
Absolutely this. A series of commits dealing with different aspects (e.g. whitespace fix, minor related bug fix, necessary refactor, then the feature) is ideal.
by orra 3y ago
Absolutely this. A series of commits dealing with different aspects (e.g. whitespace fix, minor related bug fix, necessary refactor, then the feature) is ideal.
For a start, it's easy to review, and easier to disect if something breaks.
When messy git history is provided (i.e. a history of the developer fixing their own code that they missed), squashing can be a reasonable fallback. But it's never the best option, IMHO.
- timost 3y agoI've found `git commit --fixup` and `git rebase --autosquash` to be very useful when accumulating fixes of previous commits.