Stacked PRs
Stacked PRs on GitHub, without losing your place.
A stack splits one change into small pull requests that build on each other. GitHub shows each PR on its own. Mergiato shows the whole stack on every PR, lets you step along it, and merges it the way your repo expects.
Free · no sign-up · Apple silicon and Intel Macs
What is a stacked PR?
A stacked pull request is one that targets another PR's branch instead of main. You build a change as
a chain: the bottom PR adds the API, the next one uses it, the top one adds the emails. Each stays small enough to
review in one sitting, and they merge in order, bottom first.
Where Mergiato finds the stack
It reads stacks from three places, in this order:
- GitHub's own stacks, when the repository uses them.
- Graphite's stack comment, the one Graphite posts on each PR. It's the only source that still lists PRs already merged out of the stack.
-
Plain branch chains: PRs whose base is another open PR's branch. No tool needed, just
git.
You don't need Graphite or any other tool. If your team stacks by hand, Mergiato sees the chain from the branches.
Moving through a stack
- A Stack 2/3 chip sits on every stacked PR, with ↑ ↓ buttons that open the PR above or below it.
- The sidebar groups each stack together, top first, joined by a rail, so you see which of your PRs belong together.
- The PR's Overview lists the whole stack next to the description, with each PR's checks and review state.
- Closed PRs are hidden by default, with a Show closed toggle, so an abandoned branch doesn't clutter the stack.
Merging a stack the way your repo does
The Merge button works out how the repository merges, and only offers what it allows. Two clicks merge, so a slip of the mouse doesn't.
| If the repo uses | Merge does this |
|---|---|
| Graphite's merge queue | Adds Graphite's queue label. On a stacked PR it reads Merge 2 PRs, because Graphite queues the PRs below it too. A queued PR shows Merging… and can be taken off the queue. |
| GitHub's merge queue | Adds the PR to GitHub's queue. |
| Plain merges | Merges with the methods the repo allows (your default picked first) and follows its delete-branch setting. |
When Merge is greyed out, hovering says why: an approval missing, a conflict, a failing check, or a PR below this
one that isn't approved yet. A plain GitHub merge is off for a stacked PR on purpose: it would merge into the
branch below instead of main.
What it doesn't do
Mergiato shows and merges stacks; it doesn't create or restack them. Keep using the Graphite CLI,
git or your own tooling for that, and Mergiato picks up the new stack on its next refresh.
Questions
Do I need Graphite to see stacks?
No. Mergiato also reads GitHub's own stacks and plain branch chains. Graphite adds two things when your team uses it: merged PRs in the stack list, and merging through its queue.
Does it work with Graphite's merge queue?
Yes. Merge adds Graphite's queue label, the stack's lower PRs go with it, and the PR shows when it's queued and merging. You can also take a PR off the queue from the same button.
Can I review a stack one PR at a time?
Yes. Each PR in the stack has its own diff, checks and threads. Use ↑ ↓ to move along the stack without going back to the list.
More on how Mergiato compares with Graphite itself: Mergiato vs Graphite.
Free while in beta, under 10 MB, and it signs in through your GitHub CLI.