links: Git MOC


How to rename a git branch

  1. To rename local branch
git branch -m <old-name> <new-name>
  1. 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>
  1. Push new branch to remote
git push origin -u <new-name>

tags: git