Skip to content

Instantly share code, notes, and snippets.

@jeffpapp
Last active July 20, 2023 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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