Created
October 20, 2020 17:29
-
-
Save organom/663a4fd3cd5165edd38cfe30e13f17f2 to your computer and use it in GitHub Desktop.
Renames a git 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
#!/bin/bash | |
if [ $# -lt 2 ] | |
then | |
echo "Usage: $0 old_branch_name new_branch_name"; | |
else | |
git branch -m $1 $2 | |
git push origin :$1 $2 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment