| name | rebase |
| description | Rebase the current branch onto the latest master/main and force-push with lease. Use when the user asks to rebase onto main/master (e.g. /rebase, "rebase on main", "update my branch off main"). |
| disable-model-invocation | true |
| allowed-tools | ["Bash","Read","Edit","Grep"] |
Rebase current branch on top of latest master/main
Rebase current branch onto latest master/main:
- Detect if repo uses 'master' or 'main' as default branch
- Fetch latest from origin
- Rebase onto origin/master or origin/main
- Use the history of the local branch to figure out the best way to fix any merge conflicts. If you cannot confidently resolve a conflict, ask the user for guidance before proceeding.
- After the rebase completes successfully, force push with lease:
git push --force-with-lease