Skip to content

Instantly share code, notes, and snippets.

@RockyRx
Last active March 21, 2019 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RockyRx/833d0457f75c62c2c5d80abdb578e704 to your computer and use it in GitHub Desktop.
Save RockyRx/833d0457f75c62c2c5d80abdb578e704 to your computer and use it in GitHub Desktop.
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