Cleaning up outdated Git branches

I’m pretty sure you have tons of Git branches that you have merged and removed on your server, but are still on your local clone. Here’s a Powershell script to clean them up, using non-brittle commands (just doing git branch -vv like you often see is not a good practice).