Skip to content

Instantly share code, notes, and snippets.

@hamid-ne
Last active January 18, 2018 16:25
Show Gist options
  • Save hamid-ne/ad036623fb48b7b89aa993eca3fc1132 to your computer and use it in GitHub Desktop.
Save hamid-ne/ad036623fb48b7b89aa993eca3fc1132 to your computer and use it in GitHub Desktop.

1. Rename branch locally

git branch -m old_branch new_branch

2. Delete the old branch

git push origin :old_branch

3. Push the new branch, set local branch to track the new remote

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