Principle developer tip: rewrite history to make yourself seem smarter.
Soft reset the whole branch and commit a series of atomic and semantic patches (eg separating code, test, and refactor changes) that tell a clean narrative of the changeset to reviewers, future blamers.
Senior developer tip: squash the evidence.
git commit --amend --no-edit
This helped me countless times…
Principle developer tip: rewrite history to make yourself seem smarter.
Soft reset the whole branch and commit a series of atomic and semantic patches (eg separating code, test, and refactor changes) that tell a clean narrative of the changeset to reviewers, future blamers.