RENAME GIT Local and Remote BRANCH

git checkout the_branch_to_rename: This command switches to the branch(the_branch_to_rename) to rename.

git branch -m branch_new_name: Renames the branch locally. 

git push origin :branch_old_name: Deletes the old branch (branch_old_name) from the remote repository.

git push --set-upstream origin branch_new_name: Pushes the locally renamed branch (branch_new_name) to the remote repository and sets it as the upstream branch.