-
-
Save haythamdouaihy/cf179c4a564ed81ef933474affc58768 to your computer and use it in GitHub Desktop.
git rename local and 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
# 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