| name | rebase |
| description | Pull latest main and rebase the current branch on top of it |
Rebase on Main
Pull the latest main branch from origin and rebase the current branch on top of it.
Instructions
- Verify you are NOT on
main. If on main, inform the user and stop.
- Fetch the latest from origin:
git fetch origin main
- Rebase the current branch onto the updated main:
git rebase origin/main
- If the rebase succeeds, report the number of commits replayed and the current HEAD
- If there are conflicts:
- List the conflicting files
- Show the conflict markers in each file
- Ask the user how they want to resolve each conflict
- Do NOT abort the rebase without user confirmation
- After completion, run
git log --oneline origin/main..HEAD to show the rebased commits