Created
March 17, 2014 19:03
-
-
Save evanrs/9606027 to your computer and use it in GitHub Desktop.
git.deprecate — delete remote and local branches named by arguments
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
[alias] | |
deprecate = "!f(){ for ORIGIN in $@; do if [ $ORIGIN == master ] || [ $ORIGIN == HEAD ] || [ $ORIGIN == develop ]; then echo $ORIGIN is not allowed; continue;fi; echo $ORIGIN; git branch -d $ORIGIN; git push origin --delete $ORIGIN; done; }; f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment