gh-stack

Manage and sync hierarchical software-brick and multi-branch workflows with Git-based tools.

3|1|Updated Apr 17, 2026
One-click install
npx skills add https://github.com/devantler-tech/skills --skill gh-stack
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh-stack
Source: https://github.com/devantler-tech/skills/tree/main/gh-stack
Command: npx skills add https://github.com/devantler-tech/skills --skill gh-stack

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

gh-stack automates the organization and operation of stacked branches and their associated PRs, enabling incremental code reviews across complex feature stacks.

Core Features & Use Cases

  • Create and manage a chain of dependent branches (a stack) with a clear trunk, each branch mapping to a PR.
  • Navigate, rebase, push, sync, and view the stack to maintain consistency across local and remote repositories.
  • Use cases include breaking large changes into layered PRs, updating stacks after merges, and coordinating multi-branch reviews.

Quick Start

Initialize a stack by creating the first branch above the trunk, then add additional layers as needed.

Frequently Asked Questions about gh-stack

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage stacked branches and linked PRs for incremental code review?

You manage stacked branches by creating a chain of dependent branches above a trunk, where each branch maps to a specific PR for incremental code review. This automates organization and operation across complex feature stacks.

What is the best way to rebase and sync a stack of dependent branches in git?

Rebasing and syncing a stack of dependent branches involves updating the trunk and propagating changes across all layers. The process handles rebase conflicts and synchronizes local and remote repositories to maintain stack consistency.

How do I break large changes into layered PRs using stacked branches?

Breaking large changes into layered PRs involves creating a stack of dependent branches, each representing an incremental piece of the feature. You initialize the first branch above the trunk and add additional layers as needed for review.

Can I use gh-stack to update stacked branches after a PR is merged?

Yes, you can update stacks after merges by syncing and rebasing the remaining dependent branches. This ensures that local and remote branches stay consistent and aligned with the updated trunk after changes are integrated.

Does gh-stack support non-interactive usage for automating branch management?

Yes, gh-stack enforces non-interactive usage to automate branch management tasks. It relies on command semantics to push, navigate, and view stacks of dependent branches and their PRs without requiring manual input during execution.