Anirban Ghoshal
Senior Writer

GitHub adds Stacked PRs to speed complex code reviews

news
Apr 14, 20267 mins

Breaking up is hard to do when it comes to large pull requests, so GitHub is stacking things in favor of development teams with a new feature to facilitate code reviews and prepare for an AI-driven surge in code changes.

Stacking. Stacked building blocks.
Credit: oatawa/Shutterstock

AI-aided development tools are churning out more lines of code than ever, presenting a challenge for reviewers who must review ever larger pull requests. After toying with the idea of closing the door to AI-aided code submissions, GitHub is now looking to help enterprises manage big code changes in a more incremental way. It says a new feature, Stacked PRs, can improve the speed and quality of code reviews by breaking large changes into smaller units.

“Large pull requests are hard to review, slow to merge, and prone to conflicts. Reviewers lose context, feedback quality drops, and the whole team slows down,” the company said, announcing GitHub Stacked PRs on its website.

With the new, stacked approach it aims to reduce the overhead of managing dependent pull requests by minimizing rebasing effort, improving continuous integration (CI) and policy visibility across stacked changes, and preserving review context to enhance code quality.

Stacked PRs tracks how requests in a stack relate to one other, propagating changes automatically so developers don’t have to keep rebasing their code  and letting reviewers assess each step in context, the company explained in the documentation.

The feature, GitHub wrote, is delivered through gh-stack, a new extension to GitHub CLI that manages the local workflow, including branch creation, rebasing, pushing changes, and opening pull requests with the correct base branches.

On the front end, all changes created via gh-stack are surfaced in the GitHub interface, where reviewers can navigate them through a stack map, with each layer presented as a focused diff and subject to standard rules and checks, the company added.

Developers can merge individual pull requests or entire stacks, including via the merge queue, after which any remaining changes are automatically rebased so the next unmerged PR targets the base branch.

Monorepos and platform engineering drive shift to modular development

For Pareekh Jain, principal analyst at Pareekh Consulting, Stacked PR is GitHub’s response to a structural shift being driven by large-scale monorepos and platform engineering, which are pushing teams toward more modular, parallel workflows.

“GitHub’s traditional PR model created a bottleneck where developers either waited long cycles for reviews or bundled work into large, hard-to-review PRs that increased risk and slowed merges. Stacking solves this by letting developers break a feature into smaller, dependent PRs such as database, API, and UI layers, so reviews happen incrementally while development continues in parallel,” Jain said.

“Stacked PRs is likely to see rapid adoption in mid-to-large enterprises, especially those managing monorepos. Its biggest impact is eliminating rebase hell — the manual effort of updating multiple dependent branches when the base changes,” Jain noted, adding that the feature’s integration into both the GitHub CLI and UI will also drive adoption as it removes the need for third-party tools.

Change management

The biggest obstacle to adoption of Stacked PRs will not involve changes to the code, but changes to coders’ habits, said Phil Fersht, CEO of HFS Research. “The constraint will not be the feature itself, but whether development teams adjust their workflow discipline to use stacking properly.”

That will involve them learning to organize large pull requests into neat stacks for the reviewer, which may be as challenging as reviewing a large PR.

That was echoed by Paul Chada, co-founder of agentic AI-based software startup Doozer AI: “Workflow shifts only happen when the pain of not changing exceeds the friction of learning,” he said.

AI-driven code velocity driving a new pressure point

The release of Stacked PRs comes amid a deeper structural shift in software development: the rise of AI-assisted coding. This is accelerating the pace of code generation, increasing the volume of changes and making traditional, linear review workflows harder to sustain.

“AI-assisted coding has changed the math. When humans wrote the code, big PRs were annoying but tolerable,” said Chada. “Now agents produce 2,000-line diffs across 40 files in seconds, and GitHub is staring down 14 billion projected commits this year versus 1 billion last year. That’s not a workflow problem, it’s a survival problem.”

GitHub appears to be betting that Stacked PRs changes the way development teams view a unit in software development by making it small, attributable, and revertible, regardless of  whether the author is a senior engineer or an agent, Chada said.

But, he cautioned, integrating Stacked PRs with coding agents risks adding to toolchain sprawl for enterprises.

“The current dev toolchain — IDE plus Copilot plus Claude Code plus Codex plus stacking tools plus review bots plus CI/CD plus security scanners plus MCP servers — is squarely in the Cambrian explosion phase,” Chada pointed out.

Competitive pressures

GitHub Stacked PRs isn’t an entirely novel idea: There are third-party tools that work with GitHub already offering the similar functionality.

Jain said GitHub’s addition of the feature will likely impact Graphite CLI, a GitHub-focused tool that allowed stacking PRs when the functionality wasn’t natively available.

“Graphite has been the market leader in this space. GitHub’s entry validates the Stacking category but poses an existential threat to Graphite’s core value proposition,” Jain said. “To survive, Graphite will likely need to double down on superior UI/UX, faster performance, and features GitHub won’t touch like cross-platform stacking for GitLab and Bitbucket.”

That competitive pressure also reflects a broader platform play.

Stacked PRs, Jain further noted, represents a “strategic move” to internalize a workflow long used by high-velocity teams at companies like Google, Meta, and Uber, referring to the stacked differential code review model popularized by tools like Phabricator.

Stacked differentials, much like Stacked PRs, are a series of small, dependent code changes reviewed individually but designed to build on each other and land as a cohesive whole.

In effect, this means that GitHub is trying to pull enterprises away from such tools by making it easier to adopt these advanced workflows natively within its own platform, reducing the need for external tooling.

There is also a quieter platform economics angle emerging, Chada pointed out.

“GitHub is effectively building out infrastructure to absorb a surge of machine-generated activity that does not yet translate into proportional revenue, from third-party coding agents that compete with its own GitHub Copilot to the very workflows those agents are accelerating,” Chada said.

In that light, Stacked PRs looks as much like a scaling response as a developer experience upgrade — one that could foreshadow a shift in how GitHub monetizes its AI layer, with Copilot pricing likely to move toward more usage-based models over time, Chada added.