gh-stack icon indicating copy to clipboard operation
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

Open davwheat opened this issue 3 weeks ago • 0 comments

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

  1. Set "Limit how many branches and tags can be updated in a single push" for the repo
  2. Attempt to open a stack with gh stack submit with more branches than that limit
  3. 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 stack and reproduced this issue on the latest stable release.

davwheat avatar Nov 05 '26 00:11 davwheat