The Agony of the Mega-PR
Every experienced developer knows the pain. You spend weeks on a large feature, meticulously crafting hundreds of lines of code across dozens of files. Then comes the moment of truth: you open a pull request, and it’s a monster. Your teammates groan at the sight of a +2500 -1800 diff. Reviews are slow, feedback is superficial because nobody can hold the entire change in their head, and the risk of merging a subtle bug is immense. Stacked pull requests—a chain of small, dependent PRs that build on each other—are the antidote. But managing them manually with Git is a nightmare of interactive rebases and git rebase --onto. gh-stack, an official extension for the GitHub CLI, is here to be your automated cure.
It’s not the first tool to tackle this problem, but its status as an official GitHub project makes it immediately compelling. It aims to provide a first-party, native-feeling experience for a workflow that has, until now, been the domain of third-party tools like Graphite. The core promise is simple: let us handle the tedious Git mechanics so you can focus on writing code in small, reviewable chunks.
A Streamlined Stacking Workflow
The real strength of gh-stack lies in its intuitive and well-designed command structure. The quick start guide in the README isn't just a demo; it's the actual day-to-day workflow. You begin with gh stack init, which sets up the stack's metadata inside your local .git directory—a smart choice that avoids cluttering your project with new files. It can adopt existing branches or create new ones, and it intelligently defaults to your repository's main branch as the trunk.
From there, the flow is logical. You make some commits, and when you're ready for the next layer of your feature, you run gh stack add <branch-name>. This command creates a new branch on top of your current one, adds it to the stack, and checks it out for you. It's a small automation, but it replaces several Git commands and prevents the common mistake of branching from the wrong place. The add command also includes convenient flags for creating a commit on the fly (-m) and staging files (-A or -u), which further streamlines the process of breaking up work.
Once you have a few layers in your stack, gh stack push and gh stack submit do the heavy lifting. They push all the branches in the correct order and then open a corresponding pull request for each one. Crucially, gh-stack sets the base branch of each PR to the branch below it in the stack. This is the magic of stacked PRs: when a reviewer looks at PR #3, they only see the commits unique to that layer, not the combined changes from PRs #1 and #2. The tool also links the PRs together on GitHub, making the entire stack easy to navigate.
The Rebase and Checkout Power Tools
Creating the stack is only half the battle; maintaining it is where most developers give up. This is where gh-stack truly shines, particularly with its rebase command. gh stack rebase is the workhorse of the extension. It fetches the latest changes from your trunk branch (e.g., main), and then performs a cascading rebase, updating each branch in the stack in order from bottom to top. It even has a clever feature for when a PR in the middle of your stack gets merged: it automatically detects this and uses rebase --onto to correctly transplant the remaining branches on top of the new trunk, avoiding a world of Git pain.
Conflict resolution is also handled gracefully. The rebase pauses, tells you which files have conflicts, and waits for you to fix them. A simple gh stack rebase --continue picks up where you left off, and gh stack rebase --abort can unwind the entire messy operation, restoring all your branches to their pre-rebase state. This safety net is invaluable.
The gh stack checkout command is another highlight. It acts as a centralized navigation tool for all your stacked work. You can check out a stack using a PR number, URL, or branch name. More impressively, when run interactively, it presents a searchable list of all stacks—both local and remote-only. This makes it incredibly easy to pick up a colleague's work for review. Selecting a remote stack automatically fetches all its branches and configures the stack locally. It's a seamless bridge between your local machine and the work happening on GitHub.
Still a Work in Progress
For all its polish, you can't ignore the version number: v0.1.0. The first release was just a few days ago, on July 29, 2026. This is a brand-new tool. While its backing by GitHub gives it credibility, it lacks the years of battle-testing that alternatives have. With 59 open issues, it's clear that early adopters are finding edge cases. Users should be prepared for some bugs and breaking changes in the future.
The feature set, while strong, is also focused. It doesn't have the rich web UI, review dashboards, or team analytics that a full platform like Graphite offers. This is by design—it's a CLI extension, not a SaaS product—but it's a critical distinction. The AI agent integration mentioned in the README feels more like a forward-looking nod to future trends than a core feature today. It's neat, but it's not a primary reason to adopt the tool right now.
Ultimately, gh-stack is an excellent and promising tool that nails the core experience of stacked development. It's the perfect on-ramp for developers who are curious about stacked PRs but have been intimidated by the Git gymnastics required. Its deep integration with gh and GitHub makes it feel like a natural extension of the platform. As long as you're comfortable being an early adopter of a v0.1 project, gh-stack is poised to become the default way to manage stacked PRs on GitHub.