rebase

Rebase the current branch onto a target branch and summarize conflict resolutions.

6|3|Updated Sep 13, 2017
One-click install
npx skills add https://github.com/tomholford/dotfiles --skill rebase-tomholford
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rebase
Source: https://github.com/tomholford/dotfiles/tree/main/claude/skills/rebase
Command: npx skills add https://github.com/tomholford/dotfiles --skill rebase-tomholford

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Rebase and align a feature branch onto a target branch, automatically handling conflicts and summarizing resolutions to maintain a clean history.

Core Features & Use Cases

  • Pre-flight checks to ensure a clean working tree and an up-to-date target branch.
  • Automatic rebase against the target (origin/<target>), preferring remote-tracking branches when available.
  • Conflict resolution loop that reads conflicting files, merges changes while preserving intent, and captures a final summary report.
  • Use Case: staying in sync with main while developing a feature, resulting in a linear history and detailed conflict logs.

Quick Start

Provide a target branch to rebase your current branch onto (defaulting to master or main if not specified) to begin the operation.

Frequently Asked Questions about rebase

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

FAQPage Schema
How do I rebase a feature branch onto main and automatically resolve git conflicts?

You can rebase a feature branch onto main by running the Skill with a specified target branch, which triggers pre-flight checks, executes deterministic rebase commands against origin/main, and resolves per-file conflicts while recording a final summary report.

What is the best way to maintain a linear git history when developing a feature branch?

Rebasing your feature branch onto a target branch maintains a linear git history by replaying commits on top of the latest origin/main, automatically resolving any per-file conflicts and generating an audit summary of the changes.

Do I need a clean working tree before starting a git rebase?

Yes, you need a clean working tree before starting a git rebase. The Skill performs pre-flight checks to ensure your working directory is clean and that your target remote-tracking branch is up-to-date before initiating the rebase process.

Can I specify a custom target branch when rebasing my current branch?

Yes, you can specify a custom target branch to rebase your current branch onto. If no target branch is provided, the Skill defaults to using master or main, preferring remote-tracking branches when available to ensure accurate integration.

How does automatic conflict resolution work during a branch rebase?

Automatic conflict resolution during a branch rebase works by reading conflicting files, merging changes while preserving intent, and entering a resolution loop that handles per-file conflicts. Each resolution is recorded to produce a concise final summary report.

Why should I use automated rebase instead of manual merge conflict resolution?

Automated rebase provides deterministic conflict resolution and detailed audit logs, capturing each change in a summary report, whereas manual resolution lacks systematic tracking and can lead to inconsistent history when integrating feature branches with origin/main.