git amend branch name code example Example: git rename local branch git branch -m <oldname> <newname>