Legacy branches in Visual Studio Code
I code in the open source IDE Visual Studio Code and maintain the code on GitHub. Many old entries that no longer exist have accumulated in the list of branches. How do I get rid of them again, I can’t find a suitable button anywhere?
There is no button, you have to go to the command line to clean up the list. Navigate to the folder containing the repository and run the following line:
git fetch --prune
This will only clean up branches that no longer exist on the GitHub server. Local branches remain untouched.