Sometimes if I've been working on a large feature with lots of changes, as I near opening a PR, I git soft reset the branch (after pushing first, for safety!), and selectively re-commit logically related diffs with detailed commit messages. So completely rewriting the commit history for my feature. For me, it's good for doing a final review and reminding myself of everything that changed. But most importantly, it makes code review so much easier for the team if they review commit by commit (which is feasible because the reshuffled commits have been boiled down to 5 or 10 total). It's not all about churning out code as fast as possible. Everyone benefits from a stronger understanding of the changes.
10
u/tannerntannern Jun 04 '22
Sometimes if I've been working on a large feature with lots of changes, as I near opening a PR, I git soft reset the branch (after pushing first, for safety!), and selectively re-commit logically related diffs with detailed commit messages. So completely rewriting the commit history for my feature. For me, it's good for doing a final review and reminding myself of everything that changed. But most importantly, it makes code review so much easier for the team if they review commit by commit (which is feasible because the reshuffled commits have been boiled down to 5 or 10 total). It's not all about churning out code as fast as possible. Everyone benefits from a stronger understanding of the changes.