sincecutoff.com
← all changes

gh-stack gh stack modify restructures a branch stack

Introduced 2026-05-11 · score 0.96

HOW TO USE IT

When you have an active stack checked out, a clean working tree, no rebase in progress, no PR queued to merge, and linear history, run `gh stack modify` to open the TUI and stage branch changes. Save to apply them; if a conflict occurs, resolve it and run `gh stack modify --continue`, or restore the pre-modify state with `gh stack modify --abort`.

gh stack modify
gh stack modify --continue
gh stack modify --abort

WHY THIS HELPS

Restructure a branch stack by dropping, folding, renaming, or reordering branches.

REQUIREMENTS AND LIMITATIONS

  • Version: v0.0.3
  • --continue: Continue after resolving conflicts.
  • --abort: Abort the modify session and restore the stack to its pre-modify state.
  • x: Drop a branch and its commits from the stack.
  • d: Fold the selected branch into the branch below it, toward trunk.
  • u: Fold the selected branch into the branch above it, away from trunk.
  • r: Rename a branch locally and in stack metadata.
  • Shift+↓ / Shift+↑: Move a branch down toward trunk or up away from trunk.
  • Ctrl+S: Apply staged changes.
  • Prerequisite: Requires an active stack checked out locally, a clean working tree, no rebase in progress, no PR in the stack queued for merge, and linear commit history.
  • Prerequisite: Install GitHub CLI 2.0 or later and Git 2.36 or later; install the extension with `gh extension install github/gh-stack`. Authenticate with `gh auth login` if needed.
  • Prerequisite: The release notes state Stacked PRs must be enabled for the repository for the CLI functionality to work.
  • The command is interactive.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card