Created
March 12, 2018 17:43
-
-
Save jonhilgart22/ce59da0a5996d70ffc73fd8c40b2662d to your computer and use it in GitHub Desktop.
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
# Delete branches that have been merged | |
function cleanup-branches { | |
git checkout master;comm -12 <(git branch | sed "s/ *//g") <(git remote prune origin --dry-run | sed "s/^.*origin\///g") |xargs git branch -D | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment