Skip to content

[Bug]: When branch protection rules prevent pushing more than N refs at once, gh stack submit fails and loses all of your progress #617

Open

Description

@davwheat

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

  • I searched the existing issues for duplicates.
  • I ran gh extension upgrade stack and reproduced this issue on the latest stable release.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug Reports

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions