Rebase a feature branch onto main and force-push it safely. Use when updating, rebasing, or syncing a branch with main, or resolving rebase conflicts.
Scanned 9/3/2026
Install to Claude Code
npx -y skills add rhesis-ai/rhesis --skill update-branch --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Update Branch?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/rhesis-ai-update-branch)More formats (shields.io, HTML) on the badges page.
---
name: update-branch
description: Rebase a feature branch onto main and force-push it safely. Use when updating, rebasing, or syncing a branch with main, or resolving rebase conflicts.
---
# Updating a Branch
**Rebase onto `main`; don't merge `main` into the branch.**
```bash
git fetch origin && git rebase origin/main
```
Merging leaves a merge commit and interleaves unrelated `main` changes into the branch's history,
which makes the PR diff noisy and stops the branch's own commits from reading as a clean sequence.
## Conflicts
Fix the files, `git add <file>`, then `git rebase --continue`. `git rebase --abort` puts the branch
back the way it was.
## Pushing after a rebase
A rebase rewrites history, so an already-pushed branch needs:
```bash
git push --force-with-lease
```
`--force-with-lease` refuses to overwrite commits someone else pushed, which plain `--force` will
do. On a branch someone else is working on, tell them before you force-push.
**Never force-push `main`.**
Pushing needs the user's go-ahead — see the commit rules in `AGENTS.md`.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!
Practical guide to testing web applications with screen readers for comprehensive accessibility validation.