GitHub Stacked PRs: Native Tools for Smaller, Faster Code Reviews

Added
Article: Very PositiveCommunity: PositiveDivisive

GitHub Stacked PRs allow developers to break large code updates into a series of small, reviewable layers that build on each other. Supported by the `gh stack` CLI and native UI features, the system simplifies managing interdependent branches and cascading rebases. This workflow enhances code review quality and speeds up the merging process for complex features.

Key Points

  • Stacked PRs decompose large, complex changes into a chain of small, focused pull requests that build on one another.
  • The `gh stack` CLI automates the local workflow, including branch creation, pushing, and performing cascading rebases across the stack.
  • GitHub's UI natively supports stacks with navigation maps and ensures branch protection rules are applied relative to the final target branch.
  • Developers can merge an entire stack at once, and the system automatically rebases remaining PRs when a lower layer is merged.
  • AI integration via `npx skills` allows coding agents to assist in developing and managing stacks from the start.

Sentiment

The overall sentiment is cautiously positive but tinged with frustration. Most commenters agree the feature addresses a real need, but many feel GitHub is years behind competitors like Phabricator and Gerrit. There is significant enthusiasm for alternative VCS tools like Jujutsu that handle these workflows more natively. The community respects the engineering effort but questions whether bolting stacked diffs onto GitHub's PR model can match purpose-built systems.

In Agreement

  • Stacked diffs make both reviewing and working on long-running features much nicer by encouraging smaller, faster-to-review changes
  • The automated cascading rebase and one-click stack merging solve real pain points that made manual stacked PRs on GitHub extremely tedious
  • AI coding agents naturally produce large diffs, making stacked PRs increasingly necessary for reviewable AI-generated code
  • The ability to merge multiple PRs in a stack simultaneously with a single CI run is a significant practical improvement
  • GitHub's native UI support with a stack map for navigation between layers is a meaningful improvement over CLI-only third-party tools

Opposed

  • Stacked PRs are 'lipstick on a pig' — GitHub's PR model is fundamentally broken compared to Phabricator and Gerrit's per-commit review approach
  • Git's existing commit model already supports reviewing individual commits; stacked PRs add unnecessary abstraction
  • Constant rebasing and force-pushing required by stacked workflows is dangerous and goes against Git's design philosophy of preserving history
  • This creates vendor lock-in to GitHub-specific tooling when portable Git skills should be preferred
  • If an early PR in the stack gets rejected or requires major changes, it can invalidate all subsequent work in the stack
GitHub Stacked PRs: Native Tools for Smaller, Faster Code Reviews | TD Stuff