Last active
August 29, 2015 14:12
-
-
Save joshbtn/8f493b5f6a0dbfd13543 to your computer and use it in GitHub Desktop.
Match and remove remote 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
git push origin $(git for-each-ref --format "%(refname)" refs/remotes | cut -d"/" -f4- | grep -Eiv '(^HEAD|^master)' | awk '{print ":"$1}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment