Created
February 23, 2017 02:54
-
-
Save ivankristianto/b57d7277087d2d8627ccd249a905a3d4 to your computer and use it in GitHub Desktop.
Archive 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
arcdel() { | |
if [ -z $1 ]; then | |
echo "Error: missing branch name" | |
else | |
git checkout $1 | |
git pull origin $1 | |
git tag archive/$1 | |
git push origin archive/$1 | |
git checkout master | |
git push origin --delete $1 | |
git branch -d $1 | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment