View as Markdown

Stacks

Break large changes into small, reviewable pull requests. One branch, many PRs.


AI can write 1,000 lines of code in minutes, but nobody wants to review a 1,000-line pull request. Reviewers skim instead of reading, bugs slip through, and merges stall for days.

The Problem: One Branch = One PR

Section titled The Problem: One Branch = One PR

GitHub’s pull request model ties every branch to a single PR. As you add commits, the PR grows, and so does the review burden.

main A B C D E PR #1

Developers face a bad choice: ship one giant PR that no one can review thoroughly, or manually manage a chain of dependent branches and rebase each one whenever the base changes. Git has the tools to split work into atomic commits. GitHub just doesn’t expose them as separate, reviewable units.

The Solution: One Branch, Many PRs

Section titled The Solution: One Branch, Many PRs

Mergify Stacks maps each commit on your branch to its own pull request, automatically chained in dependency order.

main A B C D E PR #1 PR #2 PR #3 PR #4 PR #5

You work on a single local branch using standard Git: commits, rebase, amend. When you push, Stacks creates a separate PR for each commit, linked together so reviewers see the logical progression of your work.

  • Small, focused PRs that reviewers actually read
  • One local branch (no juggling N branches for N PRs)
  • Automatic PR chaining with dependency tracking
  • Smart updates that only touch PRs that changed
  • Standard Git, no new commands to learn
  • Complements Merge Queue for safe, fast landing
Terminal window
uv tool install mergify-cli
mergify stack setup
mergify stack push

Three commands to go from a branch with commits to a stack of reviewable PRs on GitHub. See the setup guide for details.

Concepts

How stacks work under the hood: Change-Ids, branch mapping, and PR chaining.

Setup

Install the CLI and configure your repository in under 2 minutes.

Creating Stacks

Walk through creating your first stack from branch to PRs.

Updating Stacks

Amend, reorder, squash, or add commits and keep PRs in sync.

Reviewing Stacks

A reviewer’s guide to navigating and reviewing stacked PRs.

Team Adoption

Why and how to roll out stacked PRs across your engineering team.

Was this page helpful?