Created
July 25, 2018 09:23
-
-
Save martijnburgers/da4b155b1a9b5fa954c02949fba751a2 to your computer and use it in GitHub Desktop.
Windows delete all branches except 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
PS: git checkout master; git branch -D @(git branch | select-string -NotMatch "master" | Foreach {$_.Line.Trim()}) | |
CMD with C:\Program Files\Git\usr\bin in your path: git branch | grep -v "master" | xargs git branch -D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment