Last active
October 16, 2017 15:21
-
-
Save stephenparish/56af2e512048fe8b8f34 to your computer and use it in GitHub Desktop.
Delete merged branches
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 --merged | ?{-not ($_ -eq "* develop")} | %{git branch -d $_.trim()} |
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 --merged | grep -v '\*\|master\|develop' | xargs -n 1 git branch -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment