GitHub Unveils Native Stacked PRs: Transforming the Code Review Workflow
GitHub has officially launched native Stacked PRs, a game-changing feature that allows developers to break large changes into a series of linked pull requests for easier review and one-click merging.

Key Points
- GitHub introduces native Stacked PRs to break large code changes into manageable, linked layers.
- New 'One-Click Merge' functionality allows entire stacks to be landed together once approved.
- Deep integration with GitHub CLI via the `gh stack` command for seamless workflow management.
- Automated rebasing and syncing across the entire stack to eliminate manual dependency management.
- Reduces reviewer fatigue by encouraging smaller, atomic changes that are easier to audit.
- Enhanced web UI visibility shows the hierarchical relationship between PRs in a stack.
GitHub, the Microsoft-owned titan of software collaboration, has officially introduced native support for Stacked PRs, marking one of the most significant shifts in the platform's workflow philosophy since its inception. This new functionality, detailed in recent documentation by author ezekg, addresses a long-standing grievance among professional software engineers: the difficulty of managing large, complex code changes within the traditional, linear Pull Request model. By allowing developers to arrange pull requests in an ordered stack and merge them with a single click, GitHub is bringing a high-end engineering workflow—previously reserved for giants like Meta and Google—to the masses. The concept of "Stacking" is rooted in the principle of atomic commits. In a standard workflow, a developer working on a multi-faceted feature might create one massive Pull Request (PR) containing hundreds of file changes. These "monolithic" PRs are notoriously difficult to review, often leading to "reviewer fatigue" where critical bugs are overlooked due to the sheer volume of code. Stacked PRs solve this by breaking the feature down into logical layers. For instance, a developer can create one PR for the database schema, a second PR (stacked on top of the first) for the backend logic, and a third for the frontend components. Each layer is reviewed independently, ensuring high code quality at every step. Technically, the native implementation is deeply integrated into the GitHub CLI (Command Line Interface) and the web UI. Through the `gh stack` command, developers can manage their entire chain of changes. The system automatically tracks dependencies between the PRs in a stack. If a reviewer requests changes on the first PR in the stack, and those changes are implemented, GitHub’s new engine can automatically rebase the subsequent PRs in the stack, ensuring that the entire chain remains consistent and conflict-free. This automation eliminates the "rebase hell" that has historically deterred developers from manually stacking PRs. One of the most impressive features of this launch is the "One-Click Merge" capability. Once every PR in a stack has been approved, the developer can trigger a collective merge. GitHub handles the sequential merging of each layer, maintaining a clean and readable Git history. This is a massive departure from the previous manual process where a developer had to wait for PR #1 to merge, then manually update PR #2, wait for CI/CD checks, and repeat the process. The time savings for large engineering teams are expected to be substantial, potentially reducing the code-to-production cycle by hours or even days. Contextually, this move by GitHub is a direct response to the rise of third-party tools like Graphite, Aviator, and various internal scripts developed by engineers at high-growth startups. These tools were built specifically because GitHub's default branching model struggled with high-velocity development. By building this natively, GitHub is reclaiming its position as the ultimate home for developer productivity. It also signals a broader trend in the industry toward "trunk-based development" and smaller, more frequent deployments, which are hallmarks of modern DevOps excellence. For enterprise customers, the introduction of Stacked PRs is a game-changer for large-scale refactors. When a team needs to change a core library that affects dozens of microservices, they can now present those changes as a stack. This allows different subject matter experts to review only the parts relevant to them, without being distracted by the noise of a 5,000-line diff. It promotes a culture of focused, high-quality feedback and reduces the cognitive load on senior engineers who are often tasked with the most difficult reviews. Furthermore, the visual representation of stacks within the GitHub web interface provides much-needed clarity. A new sidebar or header element shows the PR's position in the stack (e.g., "2 of 5"), with clickable links to the parent and child PRs. This transparency ensures that reviewers understand the context of the change they are looking at. They can see that "PR #2" is only possible because of the infrastructure introduced in "PR #1," which prevents redundant questions and streamlines the communication process. In conclusion, GitHub’s native Stacked PRs represent a maturation of the platform. By moving away from the rigid, single-branch-per-feature mindset and embracing a layered approach, GitHub is empowering developers to work faster and more precisely. As software systems continue to grow in complexity, the ability to decompose problems into reviewable, stackable units will become a fundamental skill for the modern engineer. This update isn't just a new feature; it's a blueprint for the future of collaborative coding.
The Stacking Philosophy: Moving Beyond Monolithic PRs
Stacked PRs represent a fundamental shift in how developers approach large-scale features. Instead of bundling weeks of work into a single, overwhelming Pull Request, stacking encourages developers to submit a sequence of small, focused changes. Each PR in the stack builds upon the previous one, allowing reviewers to digest the logic in logical increments. This methodology, long a staple at high-velocity tech firms, prioritizes code quality and reviewer sanity over bulk delivery. By adopting a 'layered' approach, teams can unblock themselves. A backend engineer can submit a database migration as the first layer, and while that is being reviewed, they can immediately start on the API layer as a second PR stacked on top. This parallelization of work and review significantly shortens the feedback loop, ensuring that developers aren't idling while waiting for approvals on foundational code.
Technical Automation and CLI Integration
The brilliance of GitHub's native implementation lies in its automation of the complex Git maneuvers required to keep stacks in sync. Traditionally, 'stacking' required expert-level knowledge of Git rebasing and forced pushes, which often led to broken histories. With the new `gh stack` command, GitHub abstracts this complexity. The system automatically handles the mapping of commits to PRs and ensures that any updates to a base layer are propagated through the entire stack. Furthermore, the introduction of 'One-Click Merging' for stacks ensures that the final landing of code is as seamless as the development process. GitHub validates the entire chain, runs CI/CD checks across the stack, and merges them in the correct order. This level of native support eliminates the need for expensive third-party subscriptions and provides a unified experience for developers who live in their terminal and the GitHub dashboard.
This article was drafted with AI assistance and editorially reviewed before publication. Sources are listed below.