utensils

Rebase On Main — Git skill for Claude Code

Git community

Rebase the current branch on origin/main and resolve any conflicts.

How to install Rebase On Main

Installs to ~/.claude/commands/utensils-claudette-rebase-on-main.md

Terminal
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/utensils/Claudette/HEAD/.claude/commands/rebase-on-main.md -o ~/.claude/commands/utensils-claudette-rebase-on-main.md

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

What Rebase On Main does

Rebase the current branch on `origin/main` and resolve any conflicts.

Steps

  1. **Check for uncommitted changes** — Ensure the working tree is clean:

    • Run git status to check for uncommitted changes
    • If there are uncommitted changes, warn the user and stop — do not stash or discard work
  2. **Fetch and rebase** — Update the branch:

    • Run git fetch origin main
    • Run git rebase origin/main
    • If the rebase completes cleanly, skip to step 4
  3. **Resolve conflicts** — For

Alternatives in Git

  • Ws Reset — Reset the current branch to main, fetch upstream, and update submodules 38.1k ★
  • OSS PR — Commit + PR workflow for open source contributions: auto-creates a user-prefixed branch when on main/master, t 19.7k ★
  • PR Summary — Generate a pull request summary for the current branch 5.8k ★

Full documentation available on GitHub

View Source Repository