What to Do When You Have a Big PR Blocking Other Issues
Sometimes, despite your best efforts, you end up with a large pull request (PR) that blocks other tasks. It can slow down the whole team and cause frustration. So, how do you handle it? Here’s a simple guide to managing a big PR without causing chaos.
Realize the PR is Too Big #
The hardest step is seeing that your PR is too large. It’s tempting to keep adding changes, but that can cause more problems. The toughest choice is to stop and admit the PR has become too big.
But closing a large PR isn’t a failure. It’s a learning process, similar to running a spike. As Kent Beck said:
“A spike is a quick, simple experiment aimed at exploring the problem space. It doesn’t have to be perfect, it just needs to give enough information to make a decision.”
In this case, you’ve learned a lot from the big PR. You know what works and what doesn’t. Now, you can rewrite from scratch with more clarity. By closing the PR, you free yourself from its complexity and can start fresh, using what you’ve learned.
Slice the PR into Smaller Parts #
After deciding to close the PR, break it into smaller, focused pieces. Slicing means pulling out parts of the code that can be handled on their own. This lets different parts of the work move forward without blocking each other.