Created
January 31, 2018 12:14
-
-
Save scottgulliver/538bc98894f984442acaedfeda7677db to your computer and use it in GitHub Desktop.
Delete all branches other than dev
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 | Select-String -Pattern "^* dev$" -NotMatch | foreach { $_ -replace "^ ", "" } | foreach { git branch -d $_ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment