Make Smaller Changes
Being productive in a large project is a challenge. Simple changes can take days or weeks to get merged, code reviews become unfocused, and conflicting changes sneak in faster than you can fix them.
What should you do instead? Make smaller changes.
- Split large pull requests (PRs) into smaller chunks. Smaller PRs get reviewed faster, attract more focused feedback, and encourage simpler designs.
- If the chunks are independent, submit them all at once. Independent PRs can be merged in any order, or skipped entirely if they turn out to be unnecessary.
- If you have a sequence of changes, use stacked PRs. Each PR builds on the last, so reviewers can focus on one layer of change at a time.
- Split out bug fixes into separate PRs and submit them immediately. I've seen too many small bugs go unfixed because they got tangled up in unrelated feature work.
Also, when you submit a PR put yourself in the shoes of your reviewer. Which of the following would you rather be faced with?
1 file changed
+5,
-3
or
23 files changed
+1238,
-632
Make a habit of making smaller changes.
Not an ad, but GitButler is a great tool for this.