Created
July 16, 2021 13:31
-
-
Save eralston/be18aaadf9c17cd0c0e0c76fb60f64ea to your computer and use it in GitHub Desktop.
PowerShell utilities for Git
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
# Delete all branches except trunk (and current - which will error out and not be deleted even if it's not trunk) | |
git branch | %{ $_.Trim() } | ?{ $_ -ne 'trunk' } | %{ git branch -D $_ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment