Failed Pull Request? Smart Strategies to Get Unstuck
Dealing with unmergeable pull requests can be frustrating. Learn five unconventional yet smart tactics to navigate failed PRs and maintain your reputation as a reliable programmer.
Please cite this blog post using the following BibTeX entry:
@misc{bugayenko2025blog1109,
author = {Bugayenko, Yegor},
title = {{Can’t Merge? Don't Despair.}},
howpublished = {\url{https://www.yegor256.com/251109.html}},
year = {2025},
month = {nov},
note = {[Online; accessed 08-12-2025]}
}
It's a common developer frustration: you've submitted a pull request, but it just won't merge. Perhaps a reviewer isn't satisfied, or tests are failing, preventing your changes from reaching the master branch. Instead of endlessly fixing, convincing, or resenting the process, consider adopting smarter tactics.
Amores Perros (2000) by Alejandro González Iñárritu
1. Give Up Instantly
Embrace the principle of "fail fast." If your pull request isn't progressing smoothly, consider closing it. When reviewer feedback extends beyond minor stylistic changes to fundamental architectural concerns, it often indicates a mismatch in understanding. Rather than seeing this as your error, view it as a potential flaw in the repository itself. Perhaps the README is incomplete, the code isn't clean enough, or documentation is outdated. In such cases, your proactive step is to submit bug reports to address these underlying issues. Once the repository is improved, you can re-attempt your changes with a fresh pull request.
2. Take a Smaller Bite
Often, reviewers don't reject your entire set of changes. They might approve some parts while refusing others. Leverage this by extracting the "bad" parts from your pull request. Instead of trying to push a large, comprehensive package at once, deliver what they are ready to accept. This approach might lead to merging several smaller pull requests instead of one large one, which can be particularly beneficial in environments like Zerocracy, where merged pull requests are rewarded.
3. Blame Them Wisely
Sometimes, the inability to merge stems from a defect in the existing codebase, such as a flaky test. While you know your code isn't the problem, others may assume it is, especially if the master branch's CI workflows are green while your branch shows failures. Blaming them directly won't be productive.
Your strategy should be to collect sufficient evidence and submit a bug report that clearly identifies an issue within the master branch, without any mention of your pull request. Using your PR as proof of their mistakes will likely lead to dismissal. Temporarily set aside your pull request and report the bug as if you were an external observer. Even if the master branch appears stable, finding and documenting these hidden issues is crucial, as direct blame in the context of your PR will not be heeded.
4. Move On
Just as an inexperienced poker player tries to win every hand, a junior developer might feel compelled to merge every pull request. This is a common pitfall. Some problems are not immediately solvable, and some features aren't ready for implementation. It's perfectly acceptable to close a pull request after negative feedback without feeling obligated to finish it. Your time is better spent tackling simpler bugs and implementing more straightforward functionalities.
5. Don’t Call for Help
Resist the urge to ask for help, even when facing significant hurdles. Phrases like "I can't understand why it doesn't merge!" convey a lack of self-sufficiency. While colleagues might assist, it can be an annoyance for them and could erode your reputation as a reliable programmer. Cultivating the ability to resolve issues independently is vital.
A failed pull request isn't a defeat; it's an opportunity for growth. Learn to fail fast, blame intelligently, and move forward stronger.