Created
October 2, 2020 23:47
-
-
Save loiane/2e4bdf9aae73892e1a7dc2c1b1c2a517 to your computer and use it in GitHub Desktop.
delete git remote branches
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
REMOTE="origin" | |
git branch -r | grep "^ ${REMOTE}/" | sed "s|^ ${REMOTE}/|:|" | grep -v "^:HEAD" | grep -v "^:master$" | xargs git push ${REMOTE} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment