Rebase the current git branch on origin/main, integrate any upstream branch commits, and push updated history safely. Use when you need to sync a feature branch with main and its remote tracking branch before continuing work or opening a PR.
Installation
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Rebase the current git branch on origin/main, integrate any upstream branch commits, and push updated history safely. Use when you need to sync a feature branch with main and its remote tracking branch before continuing work or opening a PR.
disable-model-invocation
true
allowed-tools
Read, Bash(git*:*)
agent
git-ninja
Sync Branch
When to use
Sync a working branch with origin/main and its remote tracking branch.
Resolve rebase conflicts and push updated history safely.
Preflight
git status and git branch --show-current.
If the working tree is not clean, stop and ask whether to stash or commit. Do not rebase with uncommitted changes.
git fetch origin.
Rebase on origin/main
git rebase origin/main.
If conflicts:
Use git status to locate conflicts.
Resolve files, git add <files>, then git rebase --continue.