Rename the branch using this command:
git branch -m [old_branch_name] [new_branch_name]
-m -m: itIt renames/movemoves the branch. If there is already a branch, you will have theget an error.
If there is already a branch and you want to rename with that branch., use:
git rename -M [old_branch_name] [new_branch_name]
forFor more information about help., use this command in the terminal:
git branch --help
or
man git branch