Skip to content

Instantly share code, notes, and snippets.

@kubadlo
Created April 28, 2019 17:48
Show Gist options
  • Save kubadlo/c825f907680fd307779febc2aac0b1a2 to your computer and use it in GitHub Desktop.
Save kubadlo/c825f907680fd307779febc2aac0b1a2 to your computer and use it in GitHub Desktop.
Delete all branches in git except master
git branch | Select-String -NotMatch -Pattern "master" | %{ git branch -D $_.ToString().Trim() }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment