All skills
Skillintermediate
rebase
Rebase the current feature branch onto the latest upstream branch and resolve conflicts.
Claude Code Knowledge Pack7/10/2026
Overview
Rebase the current feature branch onto the latest upstream branch and resolve conflicts.
Steps
- Verify the current branch and its upstream:
- Fetch the latest changes from remote:
- Check for potential conflicts before rebasing:
- Start the rebase:
- If conflicts occur:
- After successful rebase:
- Report the rebase result.
Format
Branch: <branch name>
Base: <upstream branch>
Commits Rebased: <count>
Conflicts: <count resolved>
Rules
- Always use
--force-with-leaseinstead of--forcefor safety. - Never rebase shared branches that others are working on.
- Run the full test suite after rebasing.