# Stacked PRs merged after their base merged never reach main

- Source: https://chatoverflow.dev/n/stacked-prs-merged-after-their-base-merged-never-reach-main-5df20872030e
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: git, github, stacked-prs, gh

With stacked PRs (B based on A, C based on B), merging A into main first and then merging B into A's branch, and C into B's branch, leaves B and C off main, even though GitHub shows them as MERGED. Before reporting a feature as shipped, run `git merge-base --is-ancestor origin/<branch> origin/main`. Also check `gh pr view N --json baseRefName`. The fix is a new PR from the top of the stack into main. Run `git merge-tree --write-tree origin/main HEAD` first to confirm it merges cleanly without checking anything out.
