Stacked pull requests are now in public preview 🚀 #201439
Replies: 198 comments 88 replies
|
gh extension install github/gh-stack |
|
My claude code workflow would love if the CLI allowed merging stacks as well. Further, when the stack requires a rebase, the "merge" button is still green and seems to attempt a merge that will inevitably fail, this is rather frustrating as it takes quite some time for the UI to reflect this |
|
Please show the PR approvals on the stack list and merge stack list! |
|
Idk if I did something wrong, but I did merge PR2 and then PR1 and only got PR1 merged to main. I had to merge main into PR2 and solve conflicts to be able to merge that one as well. In any case, I think it's not very intuitive what's going on; this was my structure:
|
|
Thanks for the 🥞! |
|
Can I unstack them so that I can merge things? Right now I have a PR to Branch A and cannot merge it because the PR from Branch A to Develop is blocking it, seems kind of dumb. |
|
A share button that copies the links to each PR in the stack so I can share with my colleagues when asking them to review |
|
It would be great if you made it so these new stack commands worked via github PATs - otherwise it will be a little dangerous with agents (you have to give them full access). |
|
this feature looks really promising, but I think it only becomes useful when a contributor who doesn't have access to the repo can stack PR submissions. unless I'm missing something, all branches must be in the same repo currently. They aren't when you submit a PR to another repo, and you might want to stack onto your first PR |
|
I have a use case for this that would be greatly improved with a pretty minor change. Occasionally, I need to make a change that should be deployed in multiple separate steps. For example, removing an S3 bucket from a Terraform deployment - first I need to merge a change to enable force-destroy and apply that (so it can be removed without emptying its contents first), then I need to merge a second change to actually remove it. Stacked PRs look like a great way to create both PRs ahead of time and mark them as related for reviewers, but I don't see any way for the stack creator to force the individual PRs to be merged separately. In the case I described above, someone merging both of them at once defeats the purpose and causes a failed apply. If I could disable merging multiple PRs at once for a specific stack, it would be much more useful and safer for this use case. |
|
I lowkey dislike the github stacks feature they added |
|
This feature is not currently working for any repo in our organization that has a Merge Queue. Is there any guidance of how to enable this? I verified this to see 404 vs. 200 statuses for the stack feature against all of our repos. |
|
Would be nice to be able to mark a whole stack as "ready for review" at once |
|
All commits before the stack are suddenly unverified even though no changes were made to my local signing ability, any commits pushed up after stacking are verified as usual |
|
Love the feature! My agents struggle with rebasing due to worktrees - multiple PR branches are typically checked out in different worktrees while gh stack tries to work on all PRs in the current worktree and that fails. |
|
for usual pr, I can merge without approval when urgent, but for stacked pr, I can't merge it without approval. |
|
IT appears unable to link PRs in a stack to a issue using the syntax shown on https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue |
|
Multi-PR stack merge can't satisfy Repro on a private repo with a 7-PR stack — linear, every PR approved, all required checks green — where the ruleset protecting the trunk has:
The notable part is that this persists after a fresh approval. We obtained an approval that postdated every human push to the stack by two minutes, with the trunk not having moved all day, and got the same "stale because it was submitted before the merge base changed" message — now naming the brand-new review. The rule-suite log explains why. Consequence: with — i.e. So at the moment a repo has to choose between stacked PRs and either approval-integrity rule. Merging one PR at a time is the documented workaround, but only the bottom PR needs no rebase, so every rung above it hits a retarget/rebase and needs a fresh approval — which is most of the value of stacking gone. It would be ideal if the internal rebase were exempt from these two rules, or if approvals carried across it, given the diff each reviewer approved is unchanged. Two smaller things found along the way:
|
|
From the UI perspective, would be great to have a Feature Preview or as default to have the ability too see all the stack into one line in the pull request list. |
|
Long-time user, first-time complainer. We opted into stacked PRs expecting to stack small PRs into a feature branch. It did the The problem: two patterns, identical topology
Both look the same: one PR's head is another PR's base. Inferring "stack" from that shape and Our setup is the second kind: several small PRs into a long-lived integration branch, plus one What happenedA child PR — approved, checks green, Three defects1. The error describes the wrong PR. {"status":"failed","details":{"message":"Pull request must be open and not in draft mode in order to be merged."}}Returned for a PR that was open and not in draft. It was describing a different PR in the
This hit four concurrent efforts in one repo. The UI says only "Blocked downstack" — no PR, no Fixes, in order of value
Reproduction (any empty repo)
Close PR A and the async error flips from "not in draft mode" to "must be open." Step 2 is the whole trigger, and it's legitimate: an integration branch not meant to merge for |
|
Please add support to GitHub Desktop |
|
If I have "untracked" files locally, I shouldn't really get this error message. It makes no sense to commit/stash files which are "untracked". |
|
Bug report: stack squash-merge fails with false "approving review required", and the web UI hangs silentlySummary Merging a multi-PR stack fails with a repository rule violation claiming no approving review exists, even though every PR in the stack is approved by a reviewer with write access. In the web UI, the green "Squash and merge stack" button just spins forever and surfaces no error at all. The Environment
Relevant No required status checks are configured on the ruleset. Stack shape (4 PRs) Repo state at merge time (verified via GraphQL API) For every one of the four PRs:
What happens Web UI: "Squash and merge stack" button turns green/enabled, click spins indefinitely, no error, nothing merges. CLI: Things I tried that did NOT fix it
The approval requirement is demonstrably satisfied on every PR, so the atomic stack merge appears to be evaluating approvals against something other than the current PR heads (possibly simulated post-squash commits generated during the cascading rebase). Workaround and its serious side effect Merging a single PR at a time works for the bottom PR: But immediately after the bottom PR lands, GitHub retargets the next PR (#B) onto Impact The whole-stack merge path is unusable when any branch protection / review rule is active (which is essentially every real repo), and the only workaround reintroduces exactly the repeated re-review churn stacks are meant to eliminate. The silent, error-less hang in the web UI makes this very hard to diagnose without dropping to the CLI. Expected behavior
|
|
I would like to be able to specify the Squash commit title and content. |
|
I wish I could copy the stack more easily to send to my slack channel for review |
|
Not being able to insert a PR into the middle of the stack is incredibly frustrating. Especially when a coworker asked me to split a PR up even further. You CAN do this today, but you essentially delete the stack relink and make a new one then push. It's not easy to do "just insert this PR here" which when using jj is a super easy operation (not git lol). Insert change set between two commits in the stack add another bookmark push done. |








Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Stacked pull requests break large changes into small, reviewable pull requests. They're an ordered series of pull requests that each represent focused layers of your change. With stacks, you can independently review and check each pull request, then merge everything together in one click. No more opening a single large pull request that takes forever to review, or splitting work across multiple branches you have to keep manually rebasing.
072926-gitub-tmp-pr-v08.mp4
With stacked pull requests, teams can:
main.And because stacked pull requests are built into GitHub, your existing reviews, checks, and merge requirements all work out of the box.
Get started with the CLI extension
Install the CLI extension and create your first stack in under a minute:
Create stacks from your terminal or github.com
Create a stack from github.com, the GitHub CLI, the GitHub mobile app, or with a coding agent such as GitHub Copilot using the gh-stack skill. Start with a branch and pull request for your first change. Then add branches and pull requests on top of it; each pull request targets the layer below it.
Stacks-Changelog-InLine-01-CLI.mp4
Review each layer independently
Open any pull request in the stack to review only the diff for that specific layer. Use the stack map at the top of the pull request to see how the change you're reviewing fits into the larger work. You and your teammates can each review different layers in parallel without blocking further work.
Merge everything in a single click
Merge the latest ready pull request to land it and every unmerged layer below it in one single operation. To land part of a stack, merge one or more lower layers—the pull requests above it stay open and automatically rebase and retarget. Your existing branch protections and required checks still govern what reaches
main.Stacks-Changelog-InLine-03-MergeBox.mp4
Find out more and share your feedback
Stacked pull requests are rolling out in public preview to all repositories over the coming days. Merge queue support for stacked pull requests is rolling out progressively over the coming weeks.
For more information, check out the stacked pull requests documentation, and share your feedback with us in the comments below!
All reactions