Created
December 7, 2016 09:18
-
-
Save eschaefer/f6b9c95339fc73341e6032d8f01a8c9d to your computer and use it in GitHub Desktop.
Git alias for purging old local branches no longer tracked remotely.
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 gitpurge='git branch --merged | grep -v "\*" | grep -Ev "(\*|master|develop|staging)" | xargs -n 1 git branch -d' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment