Last active
April 23, 2019 12:28
-
-
Save maraisr/8841d6747ae6cd498971d1aeea5bcad9 to your computer and use it in GitHub Desktop.
Clean remote branches except master
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 branch -ar \ | |
| grep origin/ \ | |
| grep -v 'master$' \ | |
| grep -v HEAD \ | |
| cut -d/ -f 2- \ | |
| xargs -I % -n 1 -P 8 sh -c "git push origin :%" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment