What is a stacked PR, in one picture?
A stack is two or more pull requests in one repository: the bottom one targets the trunk, and each one above targets the branch below it.
feat/frontend → PR #3 (base: feat/api-endpoints) ← top
feat/api-endpoints → PR #2 (base: feat/auth-layer)
feat/auth-layer → PR #1 (base: main) ← bottom
main
This is GitHub's own example. Shared pieces such as types and the database schema go low; code that uses them, such as API routes and UI, goes higher. GitHub's rule: if code in one layer depends on another, that code sits in the same branch or a lower one.
Each pull request shows only its own layer's diff, so a reviewer reads a small change, not the whole feature. A stack also gives each task a coding agent finishes its own pull request, which is the use GitHub names first for high-volume teams.
How do you start a stack with gh stack?
Install GitHub's CLI extension, then init, add and submit.
gh extension install github/gh-stack
gh stack init auth-layer # first branch, on top of main
git commit -am "Auth middleware"
gh stack add api-endpoints # next layer, on top of the first
git commit -am "API routes"
gh stack submit # push all branches, open the PRs, link them as a stack
GitHub's quickstart asks for GitHub CLI 2.90.0 or later and authentication with gh auth login. You can also build a stack on github.com: open the next pull request with its base set to the branch below and pick Create stack. Open pull requests that already line up get a banner offering to link them. Every command is on the gh stack page.
When can a pull request in a stack merge?
Only when it and every pull request below it meet the stack base's rules, and the stack's history is linear.
- Required reviews, required checks and CODEOWNERS are enforced on every layer, against the stack's base branch (usually
main), even mid-stack.
- Stacks merge from the bottom up. Merging a mid-stack pull request lands it and everything below it; the ones above re-target the base.
- If the trunk moved or a lower branch changed, a Rebase stack button appears in the merge box. The rebase force-pushes each branch and re-runs CI.
- In a merge queue the stack lands as one merge group. The queue may go up to 50% over its maximum group size to keep a stack together.
- Closing a pull request in the middle blocks every pull request above it.
CI runs for every pull request in a stack, so a five-layer stack runs your pull_request workflows five times. GitHub's CI guide shows how to run heavy jobs only on the lowest unmerged or the top pull request.
What changed when stacks went GA on October 6?
The general-availability release fixed the parts that hurt most in the preview.
GitHub also reports that repositories using stacks merged 9% more code than their peers during the preview, and that over two-thirds of the top 1% of repositories now use them. Those are GitHub's figures; the next section counts for itself.
How many of the top 100 repositories use stacks?
18 of the 100 most-starred repositories have at least one stacked pull request among their 100 most recently updated merged pull requests.
18 of 100repos with a stacked PR
173stacked PRs of 9,309 read
2.3%of PRs merged since October 6 were stacked
2PRs in the median stack (largest 23)
The 12 repositories with the most stacked pull requests in the sample (merge dates, US Pacific)
Stacked pull requests in the sample changed a median of 399 lines (added plus deleted), against 52 for the 7,364 unstacked ones merged since the July 30 preview. The method and every repository are in the CSV, explained on the gh stack page.
How do you pick a stacking tool?
Start from where your code lives and what you already pay for.
- All on GitHub, and no Graphite yet: use gh stack. It is free and makes the native stack.
- Already on Graphite Team for its AI reviews and merge queue: weigh $40 a user a month against GitHub's free stacks plus a review app (the sums).
- Happy in Jujutsu, Sapling or git-town: keep it, and open the stack with
gh stack link.
- Contributions mostly from forks: stacks can't help yet, since every branch must be in one repository.
Who reviews each PR in a stack?
Each layer is a regular pull request, so every review app on GitHub reviews it like any other; the stack just makes each one smaller.
For GitHub teams, IonWarp is the pick: it reviews every push to every pull request with up to eight agents, puts each finding on its line with a fix, and its IonWarp / Review check can hold a merge on a P0. Its docs list four reasons to skip a pull request (a draft, an excluded author, a release or dependency title, no reviewers on), and a stacked base branch is not one of them. GitHub's docs say a restack force-pushes each branch; IonWarp's say that after a force-push it reads the whole pull request again.
AI review apps, priced December 3, 2026
1IonWarp
Best for GitHub teams who want every layer reviewed
Price: $49 a month per workspace (Pro: 5 seats, $25 of review spend a month); Max is $149 with 10 seats and $100. 14-day trial; no free plan.
Good- Reviews each pull request in the stack on every push, like any other pull request
- Each finding lands on its line with a level (P0, P1 or P2), why it matters and a fix
- IonWarp / Review can be a required check, so an open P0 holds that layer and every layer above it
Watch out- GitHub only: no GitLab or Bitbucket stacks, and no self-hosting
- Every restack force-pushes; after a force-push IonWarp reads the whole pull request again
- On its own public 50-PR benchmark, its Code Review agent scores F1 49.2%; Qodo v2 scores 58.5%
2CodeRabbit
Best if you also host code on GitLab, Bitbucket or Azure
Price: $24 a user a month billed annually (Essentials); Team $48, Advanced $72. 14-day trial; a free plan for open source.
Good- Reviews in the pull request, the CLI and the IDE
- Connects to GitHub, GitLab, Azure DevOps, Bitbucket Cloud and Bitbucket Data Center
Watch out- Priced per user: 5 developers on Essentials are $120 a month, billed annually
- F1 42.1% on the same 50-PR benchmark, the lowest of the review apps there
3GitHub Copilot code review
Best if the team already pays for Copilot
Price: Included in Copilot Pro ($10 a user a month), Business ($19 a seat) and Enterprise ($39 a seat); each review uses GitHub AI Credits.
Good- Built into GitHub: request Copilot as a reviewer, or review your own pull requests automatically
- No extra app to install
Watch out- Not in the Copilot Free plan
- Each review spends AI credits and Actions minutes; reviews are blocked once the budget is used up
4Greptile
Best for paying per review, not per seat
Price: Free Starter for 1 developer with 50 credits a month; Pro is $1 a credit with no seat fees (a base review is 1 credit, Plus 3, Apex 10).
Good- No seat fees: credits are shared across the organization
- F1 51.1% on IonWarp's 50-PR benchmark, behind Qodo v2 and Cursor Bugbot
Watch out- Cost moves with how many reviews you run, and how deep
- Self-hosting and GitLab Self-Managed only on Enterprise, at a custom price
5Qodo
Best for the highest benchmark score
Price: Pro team from $30 a month for 2,000 credits (about 19 PR reviews), $0.015 a credit after; 14-day trial.
Good- Highest F1 on IonWarp's 50-PR Code Review benchmark: 58.5%
- Credits pooled across the team, no rate limits
Watch out- About 19 reviews per $30 pack: a busy team needs a bigger pack
- On-prem, Gerrit and bring-your-own-key only on Enterprise