Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Renaming a GIT branch - local and remotly
git branch -m <old_name> <new_name> #1
git push origin --delete <old_name> #2
git branch --unset-upstream #3 - This step is required since GIT is still holds pull/push merge configuration with the old branch.
git push --set-upstream origin <new_name> #4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.