Created
October 23, 2015 20:55
-
-
Save jesselang/c1c47606055ed5d83582 to your computer and use it in GitHub Desktop.
One-liner to keep your origin remote tidy (assuming you only care about branches being merged to 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 fetch --prune && git branch -r --merged origin/HEAD | sed "s/origin\///" | grep -v 'master\|HEAD' | xargs -n 1 git push --delete origin && git fetch --prune |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment