GIT – How to prune local tracking branches that do not exist on remote anymore

One-liner, cross platform, doesn’t look like the cat slept on your keyboard:

npx git-removed-branches

(dry-run) or

npx git-removed-branches --prune

(removes for real).
You need to already have node.js installed.

Source: git – How to prune local tracking branches that do not exist on remote anymore – Stack Overflow

Add above as external command in Visual Studio 2022 “Tools” menu:

Leave a Reply

Your email address will not be published. Required fields are marked *