smithery.ai

rebase

Rebase the current branch with flexible target options. Use when you need to rebase on main, a specific branch, or a remote branch, with intelligent conflict handling.

First seen Apr 1, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,378 B
  • docs SUMMARY.md 181 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 2 installs

SKILL.md

Rebase

Rebase the current branch.

Arguments

  • 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

  1. Fetch if needed

``bash git fetch <remote> ``

  1. Rebase

``bash git rebase <target> ``

  1. Handle conflicts (if any)
  1. Continue until complete

Handling Conflicts

  • BEFORE resolving any conflict, understand changes made to each conflicting file in the target branch
  • For each conflicting file:

``bash git log -p -n 3 <target> -- <file> ``

  • Goal: preserve BOTH target branch changes AND our branch's changes
  • After resolving each conflict:

``bash git add <file> git rebase --continue ``

  • If a conflict is too complex or unclear, ask for guidance before proceeding