Skip to content

Instantly share code, notes, and snippets.

@haythamdouaihy
Created June 11, 2018 15:01
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 haythamdouaihy/9ac5012548e3011d84bd81184ea6bc10 to your computer and use it in GitHub Desktop.
Save haythamdouaihy/9ac5012548e3011d84bd81184ea6bc10 to your computer and use it in GitHub Desktop.
git rename local and remote branch
# 1. rename local branch
git branch -m new_branch
# 2. delete old branch from remote
git push origin :old_branch
# 3. push & create new branch to upstream
git push --set-upstream origin new_branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment