GitHub Stacked Pull Requests Overview

Better Stackgo watch the original →

GitHub now natively supports stacked pull requests, allowing developers to chain dependent branches and merge them as a single unit via the CLI or UI.

Native Support for Stacked PRs

GitHub has introduced native support for stacked pull requests, which allows developers to break large, complex changes into a chain of smaller, dependent branches. Previously, developers had to manually manage these dependencies or rely on third-party tooling to avoid the friction of massive, monolithic pull requests. The new implementation treats these branches as a single logical stack, enabling users to track, review, and merge them as a cohesive unit rather than handling them as isolated, disconnected PRs.

Implementation and Workflow

Developers can manage these stacks using the GitHub CLI or by manually linking PRs through the web interface. The GitHub CLI streamlines the process significantly with specific commands:

  • Initialize a stack: gh stack init <branch-name>.
  • Add subsequent dependent branches: gh stack add <branch-name>.
  • Submit the entire stack to GitHub: gh stack submit.

Once submitted, GitHub recognizes the dependency chain and displays a stack icon on the pull request page. This integration allows users to review individual components of the stack while providing a "merge stack" option that processes all linked PRs into the target branch simultaneously. This approach eliminates the need for manual rebasing and repetitive merging when working on large features or agentic AI workflows that generate multiple sequential code changes.

  • #dev-tooling
  • #github
  • #workflow

summary by google/gemini-3.1-flash-lite. probably wrong about something. check the source.