Rebase local changes on top of remote branch updates
67
55%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./plugins/git-workflow/skills/rebase/SKILL.mdCategory: Development
rebase [--interactive]--interactive: Use interactive rebase for more control over commits (optional)Rebases your local commits on top of the latest remote changes for your active branch. This is useful when your colleague has pushed changes to the same branch and you want to incorporate them while keeping your commits on top.
This command delegates to the rebase-expert agent (Haiku model) for fast execution.
Delegation: Use the Task tool with:
subagent_type: "git-workflow:rebase-expert"prompt: Include the interactive flag if specified and current working directoryExample:
Task(subagent_type="git-workflow:rebase-expert", prompt="Run rebase in /path/to/repo")When this command is run, Claude Code should:
Verify Git State
Fetch Latest Remote Changes
git fetch origin to get the latest remote changesorigin/main)Check for Conflicts
git rebase --dry-run origin/<branch> to detect potential conflictsExecute Rebase
git rebase origin/<branch> (or git rebase -i for interactive mode)Handle Conflicts (if any)
Confirm Success
🔍 Checking repository state...
Current branch: feature/my-feature
Tracking branch: origin/feature/my-feature
Status: Clean (no uncommitted changes)📡 Fetching latest remote changes...
✅ Fetched successfully
Remote branch updated: origin/feature/my-feature🔎 Checking for potential conflicts...
✅ No conflicts expected
Your commits can be cleanly rebased on top of the remote changes.⏳ Rebasing your changes...
Rebasing 3 commits...
✅ Successfully rebased!
Your commits are now on top of the latest remote changes.📊 Rebase complete!
New commit history:
abc1234 (HEAD -> feature/my-feature) your third commit
def5678 your second commit
ghi9012 your first commit
jkl3456 (origin/feature/my-feature) colleague's latest commit
Commits rebased: 3If conflicts occur during rebase:
⚠️ Conflicts detected during rebase!
Conflicted files:
M src/auth/login.py
M src/config.py
You can:
1. Resolve conflicts in your editor
2. Run `git add <file>` after resolving
3. Continue with `git rebase --continue`
Or abort with: git rebase --abort❌ Not in a git repository
Navigate to a git repository and try again.
❌ Uncommitted changes detected
Stash or commit your changes first:
- `git stash` to temporarily save changes
- `git add .` and `git commit` to commit them
❌ Current branch is not tracking a remote
Set up tracking with: git branch -u origin/<branch>
❌ Rebase in progress
Complete or abort the current rebase first:
- `git rebase --continue` to complete
- `git rebase --abort` to cancelUse rebase when:
Use merge when:
0ebe7ae
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.