stacked-pr

Manage stacked branch workflows in Git with reset and cherry-pick propagation.

3|1|Updated Nov 5, 2022
One-click install
npx skills add https://github.com/thebrokencube/files-with-a-dot --skill stacked-pr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stacked-pr
Source: https://github.com/thebrokencube/files-with-a-dot/tree/main/configs/base/claude/.claude/skills/stacked-pr
Command: npx skills add https://github.com/thebrokencube/files-with-a-dot --skill stacked-pr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the management of complex, multi-branch Git workflows, ensuring changes propagate correctly and conflicts are resolved efficiently across dependent branches.

Core Features & Use Cases

  • Propagation Workflow: Guides users through rewriting parent branches and propagating changes to child branches using reset + cherry-pick.
  • Fixup Targeting: Ensures fixup commits are applied to the correct target commit.
  • Generated Commits: Manages deterministic commits (e.g., from codegen or dependency updates) using a drop-and-rerun pattern.
  • Conflict Resolution: Provides clear strategies for mechanical, semantic, and generated conflicts.
  • Use Case: When developing a large feature that requires several intermediate branches, this Skill helps maintain a clean, linear history and prevents merge hell.

Quick Start

Use the stacked-pr skill to propagate changes from the feature-a branch to its child feature-b.

Frequently Asked Questions about stacked-pr

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

FAQPage Schema
How do I propagate changes to child branches in a stacked PR workflow?

To propagate changes in a stacked PR workflow, you rewrite the parent branch and apply updates to child branches using a Git reset and cherry-pick sequence. This ensures dependent branches receive the correct changes while maintaining a linear history.

What is the best way to manage fixup commits in a chain of dependent branches?

Managing fixup commits in dependent branches requires targeting the specific commit intended for correction. This workflow applies the fixup directly to its target during the rewrite phase, preventing history pollution and keeping the branch chain clean.

How do I handle conflict resolution when rebasing stacked Git branches?

Conflict resolution when rebasing stacked Git branches involves addressing mechanical, semantic, and generated conflicts. The workflow provides specific strategies for each type during the reset and cherry-pick process, ensuring changes are applied correctly across the dependent branch chain.

How do I update generated commits in a multi-branch Git workflow?

To update generated commits in a multi-branch Git workflow, you use a drop-and-rerun pattern. This approach manages deterministic commits like dependency updates or codegen outputs by discarding the old commit and regenerating it fresh during the branch propagation process.

Do I need Git command-line proficiency to manage stacked branch workflows?

Yes, you need Git command-line proficiency and a solid understanding of branch management principles to manage stacked branch workflows. The process relies heavily on manual reset and cherry-pick mechanics to propagate changes correctly across chains of dependent branches.

When should I avoid using a stacked PR workflow for Git branch management?

You should avoid a stacked PR workflow if your Git branch management strategy does not rely on chains of dependent branches. The workflow is specifically designed for scenarios involving intermediate branches, using reset and cherry-pick mechanics that are unnecessary for simpler, independent feature branches.