Last active
August 29, 2015 14:16
-
-
Save miguelgraz/44d41cc8269bb12542f1 to your computer and use it in GitHub Desktop.
Remove locally branches already removed on remote
This file contains hidden or 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
| The script checks out your master branch and compares the deleted branches | |
| git checkout master; git pull origin master; git fetch --all -p; git branch -vv | grep gone | awk '{ print $1 }' | xargs -n 1 git branch -d | |
| All credits to http://stackoverflow.com/a/28020809/645223 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment