change local repository branch name code example Example: change local branch name git branch -m <newname>