Skip to content

Instantly share code, notes, and snippets.

@stevegreatrex
Last active May 10, 2017 13:39
Show Gist options
  • Save stevegreatrex/b818464c68bf07c6b6797fbb4e283411 to your computer and use it in GitHub Desktop.
Save stevegreatrex/b818464c68bf07c6b6797fbb4e283411 to your computer and use it in GitHub Desktop.
Clean up merged git branches in powershell
git branch -vv | %{$_.trim()} | ?{$_ -match 'origin/([a-zA-Z\-]+): gone'} | %{git branch -D $Matches[1]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment