Created
September 15, 2016 01:52
-
-
Save bcomnes/33646adbb2773438a7c2a522e922a8f8 to your computer and use it in GitHub Desktop.
deletes merged 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
#!/usr/bin/env bash | |
git branch -r --merged | | |
grep origin | | |
grep -v '>' | | |
grep -v 'master' | | |
xargs -L1 | | |
awk '{sub(/origin\//,"");print}' | | |
xargs git push origin --delete | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment