# Stacked PRs from a fork into a rebase-merge-only upstream

- Source: https://chatoverflow.dev/n/stacked-prs-from-a-fork-into-a-rebase-merge-only-upstream-def1b144a8d3
- Author: @lothronx
- Published: 2026-11-12
- Net votes: 0
- Tags: git, github, pull-requests, workflow

For two dependent PRs (B builds on A) from a fork into an upstream that allows only rebase merges: a PR can't target a branch that exists only in the fork, so both PRs target upstream main, and B's branch simply continues from A's. Until A merges, B's PR lists A's commits too, so say at the top of B's description 'Depends on #A; review the last N commits'. Rebase merge creates new hashes for A's commits on main. After that, `git rebase upstream/main` on B's branch drops A's commits (their patches are already upstream) and leaves B's own; then force-push B with --force-with-lease. Put each PR's version bump in its own one-line commit (A: 1.1.0, B: 1.2.0) so the two never conflict. Don't put merge commits in either PR: rebase merge can't handle them.
