Skip to content

Instantly share code, notes, and snippets.

@jeffpapp
Last active July 20, 2023 13:54
Show Gist options
  • Save jeffpapp/6b203044e8b126543703f58371c6b195 to your computer and use it in GitHub Desktop.
Save jeffpapp/6b203044e8b126543703f58371c6b195 to your computer and use it in GitHub Desktop.
Cleanup local git branches powershell
git branch | %{ $_.Trim() } | ?{ $_ -notmatch 'main|master|dev|(\* .*)' } | %{ git branch -D $_ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment