DEVOURED
gh stack (GitHub Repo)
GitHub's official `gh-stack` CLI extension now enables developers to manage complex 'Stacked PR' workflows with AI agent integration.
What: The `gh stack` tool automates the creation, rebasing, and navigation of stacked branches in Git, allowing developers to break large features into small, reviewable pull requests that inherit from one another.
Why it matters: Stacked PRs are becoming the industry standard for managing high-velocity engineering teams, and native GitHub support signals that this 'monorepo-adjacent' workflow is being adopted as a best practice.
Takeaway: Install the extension via `gh extension install github/gh-stack` and run `gh stack init` to start managing your next multi-PR feature.
Deep dive
- Provides an official command-line interface for managing chains of PRs (stacked branches).
- Automates rebasing:
gh stack rebaseperforms cascading rebases across the entire stack. - Links PRs: Uses GitHub API to chain PRs so that the base of PR N is PR N-1.
- AI Integration: Includes a skill (
gh skill install github/gh-stack) so autonomous coding agents can manipulate the stack structure. - Local state tracking: Stores metadata in
.git/gh-stackto keep track of branch order and PR dependencies. - Workflow management: Offers
gh stack submitfor atomic pushing of all layers andgh stack syncfor reconciliation.
Decoder
- Stacked PRs: A workflow where a large change is split into a series of smaller, sequential PRs that each build on the previous one, allowing for granular review without blocking progress.
Original article
Full article content is not available for inline reading.
Explore all 67 articles in today's digest
Fresh dev news, AI-digested daily. Never miss a trend at devoured.fyi