Skip to content

Instantly share code, notes, and snippets.

@scottgulliver
Created January 31, 2018 12:14
Show Gist options
  • Save scottgulliver/538bc98894f984442acaedfeda7677db to your computer and use it in GitHub Desktop.
Save scottgulliver/538bc98894f984442acaedfeda7677db to your computer and use it in GitHub Desktop.
Delete all branches other than dev
git branch | Select-String -Pattern "^* dev$" -NotMatch | foreach { $_ -replace "^ ", "" } | foreach { git branch -d $_ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment