Last active
April 6, 2016 00:17
-
-
Save zspencer/4c3707e783a476389639 to your computer and use it in GitHub Desktop.
git remove-extraneous-branches
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] | |
# Prints merged branches without the current working branch and mainline branches | |
extraneous-branches = "!f() { git branch --merged | grep -v -e 'gh-pages' -e 'master' -e 'staging' -e 'production'; }; echo `f`" | |
# Deletes the extraneous branches with a soft -d | |
remove-extraneous-branches = "!f() { git extraneous-branches; }; git branch -d `f`" | |
reb = remove-extraneous-branches |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment