Skip to content

Instantly share code, notes, and snippets.

@hugoduraes
Last active May 10, 2018 13:48
Show Gist options
  • Save hugoduraes/4046cb9332af03c30843 to your computer and use it in GitHub Desktop.
Save hugoduraes/4046cb9332af03c30843 to your computer and use it in GitHub Desktop.
# Rename branch locally
git branch -m old_branch new_branch

# Delete the old branch
git push origin :old_branch

# 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