Skip to content

Instantly share code, notes, and snippets.

@evanrs
Created March 17, 2014 19:03
Show Gist options
  • Save evanrs/9606027 to your computer and use it in GitHub Desktop.
Save evanrs/9606027 to your computer and use it in GitHub Desktop.
git.deprecate — delete remote and local branches named by arguments
[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