Stacked pull requests are now in public preview on GitHub! Using stacked diffs, you can break large changes into an ordered series of small, focused pull requests. Stacking makes each Pull Request easy to review, and the whole stack can land together.
Trunk Merge Queue supports GitHub stacked pull requests natively. Trunk users can enqueue any pull request in a stack, and the queue tests and lands that Pull Request and every Pull Request beneath it atomically, with all of the same protections your regular pull requests get.
With stacked pull request support, you can:
Enqueue a stack the way you enqueue any Pull Request: through the chrome extension, one /trunk merge comment, or a label on the Pull Request.
Enqueue the whole stack, or a subset as they get reviewed: the Pull Request you enqueue and everything below it merge together. GitHub automatically rebases the rest of the stack.
Test and merge a stack atomically: the queue runs a single round of CI covering the entire stack, then merges every Pull Request in one atomic operation.
Available on all Merge Queues
Stacked Pull Requests are compatible with all Trunk features and configurations.
Batching: stacks batch with other queued pull requests just like any other change, and --no-batch still opts a stack out when you need it tested alone.
Merge Graphs: in graph mode, the queue accounts for the impacted targets of every pull request in the stack, not just the one you enqueued. Stacks run in parallel with unrelated work and are correctly serialized against anything they conflict with.
Priority: setting priority when submitting a stack moves a stack up the queue atomically, the same way it moves a single Pull Request.
Failure isolation: when a batch fails, the queue's usual bisection kicks in, and a stack is evaluated as one unit within it.
Getting started
Stacked pull request support in Trunk Merge Queue is rolling out now. If you already use Trunk Merge, no further action is required. To set up a Trunk Mergequeue, you’ll need:
A repository with GitHub stacked pull requests enabled (currently in public preview)
Build your stack with the gh stack CLI or on github.com, then enqueue the pull request you want to land.
Check out the Trunk Merge Queue documentation for more, and send us any feedback on Slack.




