mrkeyoor.com_
Wed 16 Sept 23:50 UTC
Dev Toolsevaluationupdated 26 Aug 2026

gh-stack review

GitHub Stacked PRs is a GitHub CLI extension for turning a large change into an ordered chain of smaller pull requests. It tracks the branches locally, keeps their bases in order, and can submit, sync, restructure, navigate, or merge the stack from the terminal.

+17stars / 7d
Verdict

Our gh-stack run installed 203 packages and passed all 15 tests, so the extension is easy to trial but its v0.1.0 behavior still needs supervision. Use it when your team already understands rebases and wants GitHub-native stacked pull requests from the CLI. Keep it out of unattended release automation until success output and exit codes can be trusted across your repository setup.

We ran it

Lab card: what happened when we ran gh-stackScreenshot of gh-stack (gh.io/stacks)
Install✓ · 29s203 packages
Build✓ · 29s
Tests✓ · 73s15 passed · 0 failed of 15 (go test)
Repo181 files~52,387 lines of source · 5.8 MB · 3 CI workflows

Answers from our run

Does gh-stack build from source?

Dependencies installed in 29 seconds (203 packages), and the build succeeded in 29 seconds. We cloned commit ab00aa4 into a clean Debian container with 3 CPUs and no project-specific setup.

Do gh-stack's tests pass?

Yes: 15 of 15 passed when we ran the project's own test command (go test). Some failures need services or credentials a bare container does not have.

Who should not use gh-stack?

Teams that need stable automation exit codes today: issue 472 reports that gh stack sync can print success and exit 0 after its push fails.

What are the alternatives to gh-stack?

Git Town, git-spice, git-branchless. Our gh-stack run installed 203 packages and passed all 15 tests, so the extension is easy to trial but its v0.

Setup5/529-second install and one GitHub CLI extension command
Docs5/5Commands, recovery paths, state files, and examples are explicit
Community4/51,378 stars and active issue discussion after an August push
Maturity3/5v0.1.0 works, but current correctness reports affect trust

Discussed on

  1. hnGitHub Stacked PRs900 points

Who it’s for

Teams that already review work on GitHub and want each pull request to contain one readable layer.
Developers comfortable with rebasing and force-with-lease pushes when lower branches change.
GitHub CLI users who want stacked work available to scripts and coding agents as well as humans.
Reviewers who prefer several dependent diffs over one large pull request.

Who it’s NOT for

Teams that need stable automation exit codes today: issue 472 reports that gh stack sync can print success and exit 0 after its push fails.
Developers who rely heavily on Git worktrees: issue 459 says local stack metadata is tied to the worktree where it was created and can disappear when that worktree is removed.
Repositories that cannot tolerate history rewrites on active branches: rebase and sync can require force-with-lease pushes across several dependent branches.
Users expecting a polished, settled release line: v0.1.0 is the latest release, while current issues describe conflicting results for one-PR stacks and renamed remotes.

Setup reality

Our sandbox install succeeded in 29 seconds and pulled 203 Go packages. The build also succeeded in 29 seconds. Tests finished in 73 seconds with 15 passed and 0 failed out of 15.

Normal use needs Git, GitHub CLI v2.0 or newer, a GitHub login, and a repository remote you can push to. Installation itself is one gh extension install command; submitting or merging a stack needs the same repository permissions and branch-policy compliance as the underlying pull requests.

The checkout had 181 files, about 52,387 source lines, and 3 CI workflow files, but no Dockerfile or tests directory. Stack state lives under .git, and rebasing a lower layer can rewrite every branch above it, so clean worktrees and recoverable Git habits matter.

Small pull requests depend on an ordered branch chain

GitHub Stacked PRs gives a name and a command set to a practice experienced Git users already perform by hand. One branch sits on the trunk, another sits on that branch, and each becomes a pull request whose base is the layer below it. Reviewers see a focused diff instead of the whole feature. The extension records the order in .git/gh-stack, then handles navigation, submission, synchronization, rebasing, restructuring, and merging.

The repository is larger than the simple idea suggests. Our checkout at commit ab00aa4 contained 181 files and about 52,387 lines of source. That size makes sense once the terminal interface, Git recovery logic, GitHub stack integration, documentation site, and command surface are counted. The benefit is practical: a developer can move up or down the chain, while a reviewer gets pull requests with the intended base already assigned.

The CLI covers the whole stack, including recovery

The quick start is short: initialize a stack, add layers, push branches, view the result, and submit the pull requests. Beyond that path, checkout can find a stack by number, pull request, URL, or branch. modify can drop, fold, insert, reorder, or rename layers in a preview before applying the change. rebase records interrupted state and exposes continue and abort commands rather than leaving recovery to undocumented Git archaeology.

Our install pulled 203 Go packages in 29 seconds, and the build took another 29 seconds. There is no separate service, database, Docker image, or application account to operate. You do need GitHub CLI v2.0 or newer, an authenticated GitHub account, and push access to the repository. The extension also enables Git rerere during initialization, which can save repeated conflict resolutions when the same change travels through several layers.

What happened when we ran it

Our sandbox installed the project in 29 seconds and built it successfully in 29 seconds. The test command finished in 73 seconds: Go reported 15 passed and 0 failed out of 15. Those results came from an unprivileged Debian container with 3 CPUs and 8 GB of RAM, no secrets, and commit ab00aa4. We found no failed command or warning in the supplied result that needs explaining away.

The scan found 3 CI workflow files, no Dockerfile, and no tests directory. The absence of a tests directory did not mean the project lacked runnable tests, since go test found and passed 15 of them in package files. The measurement covers installation, compilation, and the available suite. It does not prove that pushes, branch rules, merge queues, renamed repositories, or GitHub API operations will behave correctly under a team's policies.

Success messages are the current trust problem

Issue 472 describes gh stack sync warning that its push failed, then printing that the stack synced and returning exit code 0. Issue 467 records another contradiction: a one-branch stack reports a successful submit, yet gh stack merge says it was never submitted because GitHub stack objects require at least two pull requests. These reports matter more than cosmetic roughness because scripts and people use command status to decide whether remote state changed.

GitHub listed 112 open issues, excluding pull requests, when we checked, while the repository page showed 120 combined issues and pull requests. A push on August 26, 2026 and detailed reports with maintainer discussion show an active project rather than an abandoned v0.1.0 tag. Still, automation should verify remote branch tips and pull request existence after submit or sync. A green line from the extension is not enough for a release pipeline yet.

Worktrees and rewritten history need deliberate handling

Local metadata lives in the Git directory. Issue 459 says a stack initialized inside a linked worktree keeps its state under that worktree's Git directory; removing the worktree can remove that local record. The reporter also notes that reopening the branch in the main worktree does not preserve the same local stack view. Teams assigning related branches to several coding agents in separate worktrees should reproduce this behavior before standardizing on the extension.

The 73-second test run cannot exercise a company's branch protections or conflict patterns. Rebase walks from trunk toward the top, and push may use force-with-lease after rewritten commits. The README provides abort paths and restores branches when some cascading operations fail, which is the right design for dangerous work. Even so, developers need clean working trees, reflog familiarity, and an agreement about who may rewrite a shared layer while reviews are open.

v0.1.0 is useful, but narrow alternatives may fit better

Release v0.1.0 was published on July 29, 2026. It added atomic stack merging and fixed stale-trunk handling plus duplicate-history cases after amended parent commits. The README now documents remote stack reconciliation, merge queues, headless flags, and an agent skill installed through gh skill. This is unusually direct documentation for an early release, and the GitHub ownership makes its integration with GitHub stack objects the main reason to choose it.

A clean build and 15 passing tests make gh-stack a low-cost experiment for a team already using GitHub CLI. Git Town is broader and works as a host-independent workflow layer. git-spice stays close to stacked branches, while git-branchless goes deeper into local commit-graph work. Pick gh-stack for GitHub-native stack objects and a familiar gh interface, then keep a human watching every command that claims it changed remote state.

Alternatives

ProjectWhat it isPick it when
Git TownA broader Git workflow tool with branch syncing, shipping, undo, and stacked changes.pick this instead when you want one workflow layer across Git hosts rather than a GitHub-specific stack extension.
git-spiceA command-line tool focused on creating and managing stacked Git branches.pick this instead when local stack workflows and support beyond GitHub's own extension are more important.
git-branchlessA Git workflow suite for rewriting, navigating, and testing branchless commit graphs.pick this instead when commit-graph manipulation and local workflow speed matter more than GitHub stack objects.

What people are saying

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

Sources

  1. GitHub Stacked PRs README
  2. gh-stack v0.1.0 release
  3. Issue 472: sync exits successfully after push failure
  4. Issue 459: stack metadata across worktrees
  5. Issue 467: one-PR stack submit and merge conflict

More dev tools reviews

omnyssh · dora · fd · tinycast · crystal · pydantic · the whole board →