In VSCode, after I do a pull request and delete the branch on GitHub, that branch still shows up in Visual Studio Code. If I select the branch, it gives an Error, as expected. <
All you need to do is to run this command:
git remote prune origin
Something extra that you can do, because it's annoying sometimes to open a terminal just for that.. you can add a task in vscode.
To do that please make follow these steps:
{ "label": "Git Prune", "type": "shell", "command": "git remote prune origin", "problemMatcher": [] }
How to use it:
Reference: