git-cascade-rebase

Rebase stacked Git branches onto an updated main branch with conflict guidance.

2|Updated Nov 6, 2015
One-click install
npx skills add https://github.com/ahoym/dotfiles --skill git-cascade-rebase
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: git-cascade-rebase
Source: https://github.com/ahoym/dotfiles/tree/main/.claude/commands/git-cascade-rebase
Command: npx skills add https://github.com/ahoym/dotfiles --skill git-cascade-rebase

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the complex process of rebasing a series of dependent Git branches when the main branch has been updated, preventing merge conflicts and keeping feature branches up-to-date.

Core Features & Use Cases

  • Automated Branch Rebasing: Rebase multiple Git branches in sequence onto an updated main branch.
  • Conflict Handling Guidance: Provides steps and commands for resolving merge conflicts during the rebase process.
  • Use Case: You have several feature branches stacked on top of each other (feature/A, feature/B, feature/C), and main has been updated. This Skill helps you reapply feature/A onto main, then feature/B onto the new feature/A, and so on, ensuring a clean history.

Quick Start

Run the cascade rebase command with your branches listed in order from closest to main to furthest.

Frequently Asked Questions about git-cascade-rebase

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

FAQPage Schema
How do I rebase stacked Git branches onto an updated main branch?▼

To rebase stacked Git branches, you sequentially reapply each dependent feature branch onto the updated main branch, managing dependencies to keep feature branches current and maintain a clean history.

What is the best way to handle merge conflicts during a cascade rebase?▼

Handling merge conflicts during a cascade rebase involves following specific provided steps and Git commands to resolve issues locally before continuing the sequence to ensure branch integrity.

Do I need Git CLI to automate rebasing a chain of dependent branches?▼

Yes, you need Git CLI to automate rebasing a chain of dependent branches, as the process requires executing branch validation, recording commit hashes, and running force-push commands.

How can I safely force-push stacked branches after rebasing onto main?▼

You can safely force-push stacked branches after rebasing by using the `--force-with-lease` command, which prevents accidentally overwriting remote changes made by other collaborators.

When should I use a cascade rebase for my Git workflow?▼

You should use a cascade rebase when you have multiple feature branches stacked on each other and need to update them sequentially against a newly updated main branch.