gh-stack

Coordinate stacked branches and pull requests across a multi-PR workflow.

1|Updated Oct 30, 2017
One-click install
npx skills add https://github.com/1natsu172/dotfiles --skill gh-stack-1natsu172
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh-stack
Source: https://github.com/1natsu172/dotfiles/tree/main/.agents/skills/gh-stack
Command: npx skills add https://github.com/1natsu172/dotfiles --skill gh-stack-1natsu172

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Coordinating multiple dependent pull requests and stacked branches can be error-prone and tedious. gh-stack provides a structured workflow to manage a stack of branches where each branch maps to a PR, enabling efficient reviews and incremental integration.

Core Features & Use Cases

  • Stack management: init, add, top, bottom, and navigate across trunk and stacks.
  • Automated PR linking and stack synchronization: connect PRs in a single, coherent story.
  • Non-interactive operation for agents: supports scripted workflows and CI-like automation.
  • Rebase cascades and merge handling: rebases upper layers onto updated bases and handles squash-merged PRs gracefully.

Quick Start

Initialize a stack and progressively add branches as you develop features.

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 dependent pull requests in Git?

Rebasing stacked branches requires cascading upper layers onto updated bases. gh-stack handles rebase cascades and manages squash-merged PRs gracefully, ensuring upper branches stay synchronized when lower layers are merged into the trunk.

Can I automate stacked branch workflows for agents without interactive prompts?

Using this workflow requires gh v2.0 or higher with the gh-stack extension installed. You initialize a stack and progressively add branches as you develop features, enabling incremental integration and efficient reviews.

What is the best way to link multiple pull requests into a single coherent story?

Linking multiple pull requests into a single coherent story requires automated PR linking within a stacked branch structure. gh-stack connects dependent PRs across trunk and top layers, maintaining a structured chain for efficient review.

How do I rebase a stack of branches when the base pull request is merged?

Rebasing stacked branches requires cascading upper layers onto updated bases. gh-stack handles rebase cascades and manages squash-merged PRs gracefully, ensuring upper branches stay synchronized when lower layers are merged into the trunk.

What do I need to set up before using a stacked branch workflow?

Using this workflow requires gh v2.0 or higher with the gh-stack extension installed. You initialize a stack and progressively add branches as you develop features, enabling incremental integration and efficient reviews.