Note
Stacked PRs is currently in private preview. This CLI and the referenced functionality will not work unless the feature has been enabled for your repository.
You can sign up for the waitlist at gh.io/stacksbeta.
gh-stack is a GitHub CLI extension for managing stacked branches and pull requests. Learn more about GitHub Stacked PRs here.
Quick Start
Make sure you have the gh CLI installed first, then run:
gh extension install github/gh-stackIf you already have the extension installed, upgrade to the latest version:
gh extension upgrade stackYou can optionally set up an alias to use gs instead of gh stack:
gh stack aliasNavigate to your repo and start stacking:
# Start a new stack from your default branch
gs init
# ... make changes, stash, and commit using git
# Add a new branch to the stack
gs add next-branch
# ... make changes, stash, and commit using git
# Push all branches
gs push
# Open a stack of PRs
gs submitFull details of the CLI and available commands here.
Use with Agents
Teach agents how to use the CLI by installing the included skill:
gh skill install github/gh-stackWhat's Changed
- Bump astro from 6.0.8 to 6.1.8 in /docs in the npm_and_yarn group across 1 directory by @dependabot[bot] in #60
- Guard GraphQL PR number conversion against int32 overflow by @Copilot in #56
- docs: stack object in pull_request webhooks by @Copilot in #67
- modify command by @skarim in #72
- Bump postcss from 8.5.8 to 8.5.14 in /docs in the npm_and_yarn group across 1 directory by @dependabot[bot] in #73
- docs content updates by @skarim in #83
- simplify unstack to only target the active stack by @skarim in #74
- run fetch before push operations by @skarim in #75
- open PRs as draft by default by @skarim in #76
- use PR template when opening PRs by @skarim in #77
- trim GraphQL queries by @skarim in #78
- optimize TUI load times by @skarim in #79
- improve agent friendliness of view --json by @skarim in #80
Full Changelog: v0.0.2...v0.0.3