git rename remote branch
- aliases
- No value
- tags
- No value
- description
- No value
- links
- 0290 Git
- status
- ai response
- project
- false
- area
- false
- resource
- false
- title
- git rename remote branch
- created
- 2026-03-03T13:35:59
- updated
- 2026-03-03T13:36:57
To rename a remote branch, you must delete the old branch name and push the new one. Follow these steps:
1. Rename the local branch
If you are already on the branch:
git branch -m <new-name>
If you are on a different branch:
git branch -m <old-name> <new-name>
2. Delete the old branch on the remote and push the new one
git push origin :<old-name> <new-name>
3. Reset the upstream branch for the new local branch
git push origin -u <new-name>
Summary Table
| Action | Command |
|---|---|
| Rename Local | git branch -m <new-name> |
| Delete Remote | git push origin --delete <old-name> |
| Push New | git push origin <new-name> |
| Set Upstream | git push origin -u <new-name> |