xiand.ai
Apr 14, 2026 · Updated 11:26 AM UTC
Technology

GitHub launches private preview of Stacked PRs feature

GitHub is testing a new "Stacked PRs" tool that allows developers to break large, complex code changes into a chain of smaller, interconnected pull requests.

Alex Chen

2 min read

GitHub launches private preview of Stacked PRs feature
GitHub Stacked PRs feature illustration

GitHub has launched a private preview of "Stacked PRs," a new feature designed to break large, complex pull requests into smaller, manageable chains of code changes. The tool, currently available via a waitlist, allows developers to arrange pull requests in an ordered sequence where each PR builds upon the previous one.

Large pull requests often create bottlenecks in the software development lifecycle. According to GitHub, massive diffs are difficult to review, slow to merge, and highly susceptible to merge conflicts. These large changes frequently cause reviewers to lose context, which degrades the quality of feedback and slows down engineering teams.

Stacked PRs address this by creating a "stack" where each PR represents a focused layer of a larger change. Each layer is reviewed independently but can be merged together.

Native integration and automated management

The new system includes native support within the GitHub user interface. A new "stack map" allows reviewers to navigate between different layers of a change at a glance. GitHub also ensures that branch protection rules are enforced against the final target branch, and continuous integration (CI) runs for every PR in the stack as if they were targeting the final destination.

For developers working in the terminal, GitHub introduced the `gh stack` command-line interface (CLI). This tool automates the local workflow, including creating branches, managing rebases, and pushing stacks to the remote repository.

The CLI also simplifies the post-merge process. When a developer merges a portion of the stack, the remaining PRs are automatically rebased so that the lowest unmerged PR targets the base branch.

GitHub is also extending the feature to AI-driven development. By running `npx skills add github/gh-stack`, developers can teach AI coding agents how to interact with stacks. This allows AI agents to either break down large diffs into smaller stacks or develop new features using the stacked approach from the start.

Developers interested in testing the feature can sign up for the official waitlist through the GitHub repository.

Comments

Comments are stored locally in your browser.