Help a Reviewer Out
It's easy to ignore your git history, but if you make just a little bit of effort, you can make it way easier on the people reviewing your changes, and probably get the review done faster too.
Sometimes when you're adding a feature you recognize you need to pull some code out into a new file and then make some adjustments. Here's a little trick to make it easier on your reviewer.
Make two commits:
- one commit to move the code but keep the same implementation
- a second commit that changes the implementation.
The reviewer can mostly ignore the first commit, and quickly see that all the code just moved to a new file. The magic happens in the second commit where your reviewer can see how the implementation actually changed.
Yeah, it's easier to just move the code to a new file and then shuffle it all around in one commit. But with a bit of effort, you can make the UX of your review much better on your pals.