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