Created
October 30, 2017 10:13
-
-
Save davoam/f32439d2bd786e6a994fe43be4db6b85 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
git fetch -p && for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done |
Minor modification to work across locales:
git fetch -p && for branch in `LC_ALL=C git branch -vv | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks to: https://stackoverflow.com/questions/7726949/remove-local-branches-no-longer-on-remote