Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

rebase

FreeNo executable scriptsNot checked

Rebase the current branch with smart conflict resolution. Do not invoke automatically.

dkarterby dkarter★ 130 GitHub stars

About this skill

Rebase the current branch.

Arguments: $ARGUMENTS

Behavior:

  • No arguments: rebase on local main
  • "origin": fetch origin, rebase on origin/main
  • "origin/branch": fetch origin, rebase on origin/branch
  • "branch": rebase on local branch

Steps:

  1. Parse arguments:
    • No args → target is "main", no fetch
    • Contains "/" (e.g., "origin/develop") → split into remote and branch, fetch remote, target is remote/branch
    • Just "origin" → fetch origin, target is "origin/main"
    • Anything else → target is that branch name, no fetch
  2. If fetching, run: git fetch <remote>
  3. Run: git rebase <target>
  4. If conflicts occur, handle them carefully (see below)
  5. Continue until rebase is complete

Handling conflicts:

  • BEFORE resolving any conflict, understand what changes were made to each conflicting file in the target branch
  • For each conflicting file, run git log -p -n 3 <target> -- <file> to see recent changes to that file in the target branch
  • The goal is to preserve BOTH the changes from the target branch AND our branch's changes
  • After resolving each conflict, stage the file and continue with git rebase --continue
  • If a conflict is too complex or unclear, ask for guidance before proceeding

Install rebase in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

Read
Bash
Glob
Grep

Bundled files

agents/openai.yaml

FAQ

What does the rebase skill do?

Rebase the current branch with smart conflict resolution. Do not invoke automatically.

How do I install the rebase skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the rebase skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare rebase with