rebasing-branch

Rebase a feature branch onto an updated base branch with conflict guidance.

5|4|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/cblecker/claude-plugins --skill rebasing-branch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rebasing-branch
Source: https://github.com/cblecker/claude-plugins/tree/main/plugins/git-workflows/skills/rebasing-branch
Command: npx skills add https://github.com/cblecker/claude-plugins --skill rebasing-branch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill simplifies the often complex and error-prone process of rebasing git branches. It guides you through updating your feature branch with the latest changes from mainline, handling conflicts, and preserving your work, ensuring a clean, linear project history without manual intervention.

Core Features & Use Cases

  • Pre-flight Safety Checks: Prevents rebasing mainline and ensures a clean working tree before starting the operation.
  • Automated Base Syncing: Automatically checks out and synchronizes the target base branch (e.g., main) before rebasing.
  • Conflict Handling Guidance: Pauses the workflow to provide clear instructions for resolving merge conflicts, then resumes.
  • Use Case: When your feature branch is falling behind main, simply ask to "rebase my branch onto main." This Skill will update your branch, resolve any conflicts with your guidance, and ensure a pristine commit history.

Quick Start

Rebase my current branch onto 'main'.

Frequently Asked Questions about rebasing-branch

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

FAQPage Schema
How do I rebase my feature branch onto main?

Rebasing integrates your branch's commits onto an updated base branch, rewriting history to create a linear timeline. This Skill automates the process: it syncs your base branch with remote, applies your commits on top, and guides you through conflict resolution so your feature branch stays current without merge commits.

What happens to my commits when I rebase?

Rebasing replays your commits on top of the target base, rewriting their history. Each commit is reapplied in order; if conflicts arise, you resolve them per commit before the rebase continues. Your working directory is preserved, and you can optionally maintain or reset commit author dates.

Can I rebase if I have uncommitted changes?

No. This Skill enforces a clean working tree before rebasing to prevent data loss. Commit or stash your changes first, then initiate the rebase. The Skill validates your environment as a safety check before any history rewriting begins.

How do I resolve conflicts during a rebase?

When conflicts occur, the rebase pauses and this Skill provides structured guidance for each conflicted file. You edit files to resolve conflicts, stage them, and the workflow resumes, replaying remaining commits. No manual git commands are required.

What's the difference between rebasing and merging?

Rebasing rewrites history by replaying commits linearly; merging creates a merge commit that preserves both branches. Rebasing produces cleaner, linear history ideal for feature branches; merging is safer for shared branches. This Skill implements rebase workflows for mainline integration.

Can I rebase a mainline branch like main or master?

No. This Skill detects and prevents rebasing mainline branches to protect shared history. It identifies branches you shouldn't rebase and enforces this safety check before any operation begins.