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. <
You can remove all the local branches (except master) with:
git branch -r | grep -v "master" | xargs git branch -D
And you can remove all the branches still appearing as origin/XXXX
in VSCode but already deleted in origin
with:
git fetch --prune
Note:
The first command above (taken from https://stackoverflow.com/a/52006270/3120163):