- Stacked Diffs
- reddit.com/r/programming/comments/xz0l2p/stacked_diffs_versus_pull_requests/
- Gregory Szorc’s Digital Home | Problems with Pull Requests and How to Fix Them
- Stacked Diffs Versus Pull Requests | Jackson Gabbard’s Blog
- Stacked Diffs: Keeping Phabricator Diffs Small | by Kurtis Nusbaum | Medium
Gemini:
Best Practices for Stacked PRs
When working with stacks, it’s helpful to visualize the “chain” to avoid confusion for your reviewers.
- Targeting: Ensure your dependent MR (MR B) is targeting the branch of the previous MR (MR A) rather than
main. This makes the “Changes” tab only show the new work for that specific stack. - Sequential Merging: Once MR A is merged into
main, you must update MR B to targetmainas well. GitLab often handles the “re-targeting” automatically if the source branch of MR A is deleted upon merge. - Draft Status: It is common practice to keep dependent MRs in Draft mode until the previous ones are approved, even if you’ve set up the dependency rule.