mrkeyoor.com_
Sun 02 Aug 20:48 UTC
Dev Toolsevaluationupdated 02 Aug 2026

gh-stack

gh-stack is an official command-line extension for the GitHub CLI that automates managing stacked pull requests. It simplifies breaking large features into a chain of small, dependent PRs by handling branch creation, rebasing, and setting the correct base branches for you.

Verdict

gh-stack is a fantastic, focused tool that makes a complex Git workflow accessible. As an official GitHub project, it has a level of trust and integration that third-party tools can't match. While its v0.1.0 status means you should expect some rough edges, it's the obvious first choice for any developer who lives in the GitHub CLI and wants to start using stacked PRs.

Setup5/5A single, simple `gh extension install` command.
Docs4/5The README is comprehensive, clear, and full of examples.
Community3/5Official GitHub project with good initial traction, but very new.
Maturity2/5It's a v0.1.0 release that is only a few days old; not yet battle-tested.

Who it’s for

  • Developers on teams that practice code review on small, incremental changes.
  • Engineers working on large features that need to be merged piece by piece to avoid a monolithic pull request.
  • Anyone already heavily invested in the GitHub CLI (gh) ecosystem looking for a native-feeling way to handle stacked changes.

Who it’s NOT for

  • Solo developers or teams that prefer large, single-feature pull requests.
  • Anyone who needs a graphical user interface; gh-stack is a pure command-line tool.
  • Teams looking for a fully-managed platform with advanced dashboards and metrics, as this is a focused CLI extension, not a comprehensive service like Graphite.

Setup reality

Installation is as simple as the README claims. As a GitHub CLI extension, a single command (gh extension install github/gh-stack) is all it takes, assuming you already have gh installed. There's no configuration file to edit or service to sign up for. The tool works out of the box, and its local metadata storage in the .git directory means it doesn't clutter your project's working tree.

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.

Alternatives

ProjectWhat it isPick it when
GraphiteA popular, full-featured platform for stacked changes with a powerful CLI and web UI.you want a polished, comprehensive solution with a dashboard for visualizing stacks and managing reviews, and don't mind relying on a third-party service.
SaplingA source control client from Meta that replaces Git and has native support for stacked changes.your team is willing to adopt a completely new (but Git-compatible) client to get the performance and workflow benefits of a stack-first SCM.
git-stacked-rebaseA Git extension written in Rust focused purely on the command-line mechanics of stacked rebases.you want a tool that focuses solely on the Git mechanics of stacking and prefer to manage the GitHub PR creation aspect manually.

What people are saying

  1. [github-trending] github/gh-stack

Sources

  1. Repo
  2. Homepage