You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: gh stack rebase fails whenever an upstack HEAD has moved #598
Whenever an upstack HEAD has moved (e.g. by adding a commit or rebasing) the stack fails to rebase even when that rebase is trivial. The GitHub Pull Request web UI can still rebase such stacks automatically and cleanly when the "Rebase stack" button is clicked. I know for a fact that gh stack rebase used to work in exactly this context
Add a trivial-to-rebase commit to the branch of the PR at the bottom of the stack (e.g. adding a new file)
Push the new commit
gh stack rebase
Expected behavior
The bottom pull request will rebase on main
The top pull request will rebase on the (rebased) branch of the bottom pull request
The command exits with a success
Actual behavior
The bottom pull request will rebase on main
The top pull request remains unchanged
The command exits with a failure
Terminal output
Rebasing branches in order, starting from stack-merged to stack-top
✓ Skipping stack-merged (PR #1 (https://github.com/example/example/pull/1) merged)
✓ Rebased stack-bottom onto main (adjusted for merged PR)
✗ could not determine the previous base of stack-top after stack-bottom changed; rebase this branch manually
✗ no rebase in progress
Preflight checks
I searched the existing issues for duplicates.
I ran gh extension upgrade stack and reproduced this issue on the latest stable release.
Activity