links: Git MOC
How to rename a git branch
- To rename local branch
git branch -m <old-name> <new-name>- Delete the old branch on remote
git push origin --delete <old-name>Or you can shorten the process of deleting remote branch like this
git push origin :<old-name>- Push new branch to remote
git push origin -u <new-name>tags: git