

Delete the old master branch on GitHub: We used -m (move) to rename the master branch locally, but GitHub will still have two. Head to Settings Branches on GitHub to change the default branch. If you use TFVC: In Source Control Explorer, find that folder and right-click, choose rename.
Use 'git branch -mIf you delete the old branch without pulling you may loose newly changes done by any developers. Or make sure that you are in sync with the remote branch for that you need to pull the changes.
#RENAME BRANCH CODE#
If the branch exists on the remote Git server, continue to the next steps. Of course, this only renames your copy of the branch.
This command will change the branch name in locally not in remote. Rename the local branch: git branch -m < oldbranchname > < newbranchname >.If you are in one branch and if you want to change another branch you can use above command. git branch –m new_branch_name If It Is Another Branch: git branch -m old_branch_name new_branch_name This command will rename your current local branch but not remote branch. If you want to change the current branch which you are in right now you, can use below command.

#RENAME BRANCH HOW TO#
Well throw in instructions on how to delete a branch. Git Rename Local Branchs If It Is A Current Branch: To fix this concern, well explain the step by step procedures to rename local and remote git branches.
