sincecutoff.com
← all changes

gh-stack adds atomic stack merging with gh stack merge

Introduced 2026-07-29 · score 0.95

HOW TO USE IT

If merging the current stack or a selected stack or PR, run `gh stack merge` with the appropriate optional target. Choose the merge extent and method interactively, or use `--yes` or a non-interactive terminal with a method flag to merge without prompts; the operation is all-or-nothing.

gh stack merge
gh stack merge <stack-number> --yes --squash
gh stack merge <pr-number> --yes --merge-method rebase

WHY THIS HELPS

Merge the current stack or a selected stack or pull request into its base branch.

REQUIREMENTS AND LIMITATIONS

  • Version: v0.1.0
  • [<stack-number>]: Selects a stack to merge even when it is not checked out; omitting the target uses the active local stack.
  • [<pr-number>]: Selects a PR and merges every PR in its stack up to and including it.
  • --yes / -y: Merge without prompting for confirmation; non-interactive terminals also run without prompting.
  • --merge-method <method>: Sets the method to `merge`, `squash`, or `rebase`.
  • --merge: Shorthand for the `merge` method.
  • --squash: Shorthand for the `squash` method.
  • --rebase: Shorthand for the `rebase` method.
  • Prerequisite: Install with `gh extension install github/gh-stack`. Requires GitHub CLI (`gh`) 2.0 or later and Git 2.36 or later. Authenticate with `gh auth login` if not already authenticated.
  • Prerequisite: Each PR must be open and not a draft. GitHub evaluates branch protection and repository rules during the merge.
  • Interactive wizard is for terminal use.
  • The wizard offers only merge methods allowed by the repository and defaults to the last-used method.

FIRST-PARTY EVIDENCE

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

Report a problem with this card