oalders

Git Rebase — Git skill for Claude Code

Git community

Rebases onto origin/main (or origin/master) and resolves conflicts.

How to install Git Rebase

Installs to ~/.claude/skills/oalders-kitchen-sink-git-rebase/SKILL.md

Terminal
mkdir -p ~/.claude/skills/oalders-kitchen-sink-git-rebase && curl -fsSL https://raw.githubusercontent.com/oalders/kitchen-sink/HEAD/commands/git-rebase.md -o ~/.claude/skills/oalders-kitchen-sink-git-rebase/SKILL.md

Restart Claude Code, or start a new session, for it to be picked up.

What Git Rebase does


description: Rebases onto origin/main (or origin/master) and resolves conflicts

Rebase the current branch onto the remote default branch, resolving any conflicts that arise.

Steps:

  1. Detect the default branch. Prefer main; fall back to master if main does not exist on the remote:
    • Run git ls-remote --heads origin main — if the output is non-empty, use main
    • Otherwise run git ls-remote --heads origin master — if non-empty, use master
    • If neither exists, stop a

Alternatives in Git

  • Ws Reset — Reset the current branch to main, fetch upstream, and update submodules 38.1k ★
  • Clean Worktrees (Automatic) — Automatically remove all worktrees for branches merged into master 25.5k ★
  • Git Master 24.1k ★

Full documentation available on GitHub

View Source Repository