Created
July 17, 2020 11:23
-
-
Save Convicted202/8bc034db2974317cbbc9b61501408aba to your computer and use it in GitHub Desktop.
Git rename remote branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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