gh-stack
gh-stack copied to clipboard
[Bug]: When branch protection rules prevent pushing more than N refs at once, `gh stack submit` fails and loses all of your progress
Describe the bug
When drafting PRs with gh stack submit, all state is lost if your repo's branch protection rules prevent pushing more refs than your stack contains.
This is infuriating.
Affected command
gh stack submit
gh-stack version
gh stack version 0.3.0
GitHub CLI version
gh version 2.103.3 (2026-10-26)
Operating system
macOS 26.2
Shell
zsh
Steps to reproduce
- Set "Limit how many branches and tags can be updated in a single push" for the repo
- Attempt to open a stack with
gh stack submitwith more branches than that limit - See error
Expected behavior
Either retry pushing branches individually, or allow manual pushes and re-attempting a gh stack submit afterwards without losing all your PR titles/descriptions
Actual behavior
Your titles/descriptions are lost.
Terminal output
N/A
Preflight checks
- [x] I searched the existing issues for duplicates.
- [x] I ran
gh extension upgrade stackand reproduced this issue on the latest stable release.