Created
April 5, 2020 06:23
-
-
Save itsabdessalam/896aea0e6f767531b7cdfd46758b3996 to your computer and use it in GitHub Desktop.
Git rename 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
git branch -m old new | |
git push origin :old | |
git push --set-upstream origin new | |
# alias | |
alias gmv='mv() { git branch -m $1 $2; git push origin :$1; git push --set-upstream origin $2; }; mv' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment