Skip to content

Instantly share code, notes, and snippets.

@iamthemovie
Created December 30, 2018 14:55
Show Gist options
  • Save iamthemovie/046bc3899c3ce4616591c412ce5a74df to your computer and use it in GitHub Desktop.
Save iamthemovie/046bc3899c3ce4616591c412ce5a74df to your computer and use it in GitHub Desktop.
Remove branches (powershell)
Delete all branches but Master and Infra
$(git branch).split("`r`n").trim().trim('* ') | foreach { if($_ -ne 'master' -And $_ -ne 'infra') { git branch -d $_ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment