Skip to content

Instantly share code, notes, and snippets.

@Convicted202
Created July 17, 2020 11:23
Show Gist options
  • Save Convicted202/8bc034db2974317cbbc9b61501408aba to your computer and use it in GitHub Desktop.
Save Convicted202/8bc034db2974317cbbc9b61501408aba to your computer and use it in GitHub Desktop.
Git rename remote branch
# Staying on branch with name old_branch
git branch -m new_branch # Rename locally
git push origin :old_branch # Delete old branch
git push --set-upstream origin new_branch # Push, update local branch to track new remote branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment