Created
June 19, 2018 13:43
-
-
Save kgiszewski/8eb0c9c6e7c86710d7a859186ef5bef9 to your computer and use it in GitHub Desktop.
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] | |
cleanup = !git branch --merged master | grep -v '^[ *]*master$' | xargs -r git branch -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Edit your global config file by running:
git config --global --edit
.Run as
git cleanup
.Original source: https://stackoverflow.com/questions/13064613/how-to-prune-local-tracking-branches-that-do-not-exist-on-remote-anymore/16906759#16906759