Created
May 20, 2024 17:48
-
-
Save sim2kid/afc0c987ff7fc29603f1adcd777ce1a3 to your computer and use it in GitHub Desktop.
Deletes all local branches for a given git repo. This must be executed in the repo's root folder to work. Very useful for cleaning your local 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
git branch | %{ $_.Trim() } | ?{ $_ -ne 'master' } | ?{ $_ -ne 'main'} | ?{ $_ -ne 'develop'} | %{ git branch -D $_ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment