Skip to content

Instantly share code, notes, and snippets.

@ryancbutler
Created October 14, 2021 14:49
Show Gist options
  • Save ryancbutler/bc872a766aeeb0e551f000b96fcd8782 to your computer and use it in GitHub Desktop.
Save ryancbutler/bc872a766aeeb0e551f000b96fcd8782 to your computer and use it in GitHub Desktop.
Prune Windows Git Branches
git remote update origin --prune; git branch -vv | Select-String -Pattern ": gone]" | % { $_.toString().Trim().Split(" ")[0]} | % {git branch -D $_}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment