Last active
June 17, 2021 15:34
-
-
Save sezabass/f9ddc64acef903611cac9f280a1e0954 to your computer and use it in GitHub Desktop.
Linux alias for 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
git-rename-remote-branch() { | |
currentbranch="$(git branch --show-current)" # not the best method for scripting | |
git branch -m $1 | |
git push origin :$currentbranch $1 | |
git push origin -u $1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment