Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By github Verified OrgMITIn 4 marketplaces
Splits a large change into a chain of small, stacked pull requests, creating, rebasing and submitting each branch as a reviewable layer. Requires the GitHub CLI v2.0+ and Git 2.36+. Its update notifier checks for newer releases in the background unless GH_STACK_NO_UPDATE_NOTIFIER is set.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
4 marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
A GitHub CLI extension for managing stacked branches and pull requests.
Stacked PRs break large changes into a chain of small, reviewable pull requests that build on each other. gh stack automates the tedious parts — creating branches, keeping them rebased, setting correct PR base branches, and navigating between layers.
gh extension install github/gh-stack
Requires the GitHub CLI (gh) v2.0+ and Git 2.36+.
gh extension upgrade stack
Official, unpinned stable release installations check for a newer
latest release in the
background, caching successful checks for 24 hours. When an update is available,
commands can append an upgrade notice to stderr after success or an operational failure,
also at most once every 24 hours. On failure, the original error appears first
and the exit code is unchanged. This includes non-interactive use; stdout and
JSON output are unchanged.
The check and reminder timestamps are shared across repositories for your user.
They are stored as YAML in gh-stack/state.yml beneath GitHub CLI's state
directory (~/.local/state/gh by default on macOS/Linux).
Commands never wait for a release check. Short commands may finish before a notice is ready. Failed or interrupted attempts can retry after a 15-minute cooldown instead of waiting a full day. Completed checks are cached so a later command can show the notice. No upgrades happen automatically, and development, locally linked, prerelease, and pinned installations are excluded. Help, version, and completion commands do not run the notifier. Usage errors and explicit user cancellations do not show upgrade notices.
Set GH_STACK_NO_UPDATE_NOTIFIER=1 to disable these checks and notices, including
in CI or scripts. Any non-empty value disables the notifier. Optional check
failures do not affect command exit codes; set GH_DEBUG=1 for diagnostics.
Install a release containing this feature to receive notices for future releases.
Install the gh-stack skill so your AI coding agent knows how to work with stacked PRs and the gh stack CLI:
gh skill install github/gh-stack
# Start a new stack (creates and checks out the first branch)
gh stack init
# ... make commits on the first branch ...
# Add another branch on top
gh stack add api-endpoints
# ... make commits ...
# Push all branches
gh stack push
# View the stack
gh stack view
# Open a stack of PRs
gh stack submit
A stack is an ordered list of branches where each branch builds on the one below it. The bottom of the stack is based on a trunk branch (typically main).
frontend → PR #3 (base: api-endpoints) ← top
api-endpoints → PR #2 (base: auth-layer)
auth-layer → PR #1 (base: main) ← bottom
─────────────
main (trunk)
The bottom of the stack is the branch closest to the trunk, and the top is the branch furthest from it. Each branch inherits from the one below it. Navigation commands (up, down, top, bottom) follow this model: up moves away from trunk, down moves toward it.
When you submit, gh stack creates one PR per branch and links them together as a Stack on GitHub. Each PR's base is set to the branch below it in the stack, so reviewers see only the diff for that layer.
Stack metadata is stored in <common-dir>/gh-stack (a JSON file, not committed to the repo), where <common-dir> is Git's common directory. In a normal clone this is .git/gh-stack. All linked worktrees share this catalog, including stack membership, ordering, and PR metadata.
The gh-stack recovery journals, gh-stack-rebase-state and gh-stack-modify-state, also live in the common directory and record the worktrees involved. Git's own HEAD, index, rebase, and cherry-pick markers remain per worktree.
On upgrade, nonconflicting legacy worktree catalogs are consolidated automatically and originals are preserved as backups. Conflicting definitions stop migration rather than choosing one; the error identifies the files to reconcile. Finish or abort legacy in-progress operations in their original worktree first. Do not mix old and new gh-stack versions within one clone.
Complete paused operations before switching preview stages or gh-stack versions. If recovery reports an incompatible execution lifecycle, finish or abort it using the matching build in its recorded original worktree; do not edit or remove the journal.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
gh-stack@specs is listed by specsnl/agent-skills — review the source before installing
npx claudepluginhub specsnl/agent-skills --plugin gh-stackPlugins from other owners that cover similar ground