GitHub has a new Stacked pull requests feature (do...
# dev
l
GitHub has a new Stacked pull requests feature (docs: docs.github.com/en/pull-requests/how-tos/stacked-pull-requests, blog: github.blog/changelog/2026-07-30-stacked-pull-requests-are-now-in-public-preview). It lets you deliver a larger feature as a chain of smaller, dependent PRs that build on each other, with the bottom PR based on main/master. Tooling for the
gh
CLI is at github.com/github/gh-stack: •
gh extension install github/gh-stack
— CLI extension •
gh skill install github/gh-stack
— AI agent skill Note: all head branches in a stack must be pushed to the base repository where the PRs are opened — cross-fork stacks aren't supported, so you need push access to the repo. I tried it for the first time in github.com/apache/pulsar/pull/26322. One caveat: modifying a lower PR in the stack updates the branches above it, which triggers CI for every PR in the stack — that can burn a lot of CI resources. For apache/pulsar, I opened github.com/apache/pulsar/pull/26323 to skip CI unless the PR is at the bottom of the stack.
👍 2
One important detail to pay attention to when merging: stacked PRs merge from the bottom up, either one PR at a time or as a contiguous group (the selected PR plus everything below it merges in a single operation). When merging a group with squash, the whole group can end up as a single squashed commit on the master branch. For apache/pulsar that's most likely not desirable — each PR should land as its own commit — so merge PRs one by one starting from the bottom.