rebase

Rebase current branch onto main or specified origin branches with conflict resolution.

2.1k|295|Updated Nov 4, 2025
One-click install
npx skills add https://github.com/raine/workmux --skill rebase
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rebase
Source: https://github.com/raine/workmux/tree/main/skills/rebase
Command: npx skills add https://github.com/raine/workmux --skill rebase

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Rebase the current branch with smart conflict resolution to prevent manual merge conflicts and maintain a clean history.

Core Features & Use Cases

  • Intelligent conflict handling that preserves changes from both sides and offers clear guidance for resolution
  • Flexible argument handling: supports no-arg rebase onto main, "origin" forms (origin/main), specific origin branches, or local branches
  • Automated fetch and rebase workflow with step-by-step conflict resolution suggestions
  • Use Case: Rebase a feature branch onto main before merging to linearize history and simplify testing

Quick Start

Run the rebase skill to rebase your current branch onto main. Examples: rebase to rebase on main; rebase origin/feature to rebase on origin/feature; rebase origin/main to fetch and rebase onto origin/main.

Frequently Asked Questions about rebase

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

FAQPage Schema
How do I rebase my branch onto main without manual conflict resolution?

Rebase automates safe rebasing with smart conflict resolution that preserves changes from both sides. Run `rebase` to rebase your current branch onto main, or specify a target branch like `rebase origin/main`. The Skill handles conflicts intelligently and provides clear guidance for resolution.

What's the difference between rebasing onto main versus origin/main?

Rebasing onto main uses your local main branch, while `rebase origin/main` automatically fetches the remote and rebases onto the origin version. Use origin forms to ensure you're working with the latest remote state before integrating your feature branch.

Can I rebase onto a specific branch instead of main?

Yes, rebase supports flexible argument handling. Specify any branch name—local or remote—like `rebase origin/feature` or `rebase develop`. The Skill applies the same smart conflict resolution regardless of target.

How does rebase maintain a clean git history?

Rebase linearizes history by replaying your commits on top of the target branch, eliminating merge commits. This creates a straight commit timeline that simplifies testing and code review before merging to main.

What happens if conflicts arise during rebase?

Rebase detects conflicts and offers step-by-step resolution guidance. Its smart conflict handling preserves changes from both sides, reducing manual intervention and helping you resolve disputes without losing work.

Do I need to fetch before rebasing onto a remote branch?

No, rebase handles optional fetch automatically when you use remote branch forms like `rebase origin/main`. For local rebases, fetch manually beforehand if needed to ensure you're rebasing onto current code.