Skip to content

Instantly share code, notes, and snippets.

@GeorgiosGoniotakis
Last active October 21, 2021 14:43
Show Gist options
  • Save GeorgiosGoniotakis/2b111602d5c0914f2f71492c47229448 to your computer and use it in GitHub Desktop.
Save GeorgiosGoniotakis/2b111602d5c0914f2f71492c47229448 to your computer and use it in GitHub Desktop.
Delete all local Git branches except master (Windows PowerShell)
git branch | %{ $_.Trim() } | ?{ $_ -ne 'master' } | %{ git branch -D $_ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment