how to rename branch in git locally and remotely code example Example: change local branch name git branch -m <newname>