1.- Enter inside the branch that you want to rename with git checkout command <branch's_name_to_be_rename>
git checkout stable
2.- Execute git branch -m <branch's_name_new>
command to change the name of the branch. You can see the changes and all branches with git branch
command.
git branch -m develop
3.- If you want to do the process in one step you need to use git branch -m <branch's_name_to_be_rename> <branch's_name_new>
command. You do not need to be inside the branch to rename.
git branch -m stable develop
Reference:
ย