Rebase On Main — Git skill for Claude Code
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
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
**Check for uncommitted changes** — Ensure the working tree is clean:
- Run
git statusto check for uncommitted changes - If there are uncommitted changes, warn the user and stop — do not stash or discard work
- Run
**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
- Run
**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 RepositoryRelated Skills
Rebase PR
Use when: rebasing a PR branch onto main and the rebase produces conflicts. Triggers on: rebase origin/main, r
Git Rebase
Rebases onto origin/main (or origin/master) and resolves conflicts
Rebase Master
Fetch origin/master and rebase the current branch onto it
Resolve Conflict
You are resolving git merge/rebase conflicts. Follow this procedure, and briefly tell the user what you're doi
Safe Pull
安全地從 origin/main 拉取最新內容到本機,自動 stash 本地未 commit 的修改,rebase 完成後再還原
Stack Sync
Cascade-rebase the current branch and all its descendants onto the new main, after a parent PR has merged. Use
Related Agents
Merge Resolver
Resolve git merge conflicts by analyzing commit history, code intent, and metadata. Use when PRs have conflict
Gitnexus Branch Hygiene Reviewer
GitNexus branch hygiene and mergeability reviewer. Use to classify merge state, conflicts, stale branches, mer
Git Reconciler
Git branch reconciliation specialist using git and the gh CLI. Use whenever there are merge conflicts, a diver