Visual Studio continues to show any branch I\'ve pulled, even after that branch has been deleted (and I do not have it as the selected branch).
git fetch -
Visual Studio 2015 & 2017
prune
is about removing any remote-tracking references that no longer exist on the remote.
So if the branch still exists on the remote side, it won't be deleted locally.
If the branch is deleted locally (with Visual Studio), its remote tracking instance will still be re-created at the next push.
You need to make sure the branch is also deleted on the remote side:
git push origin --delete abranch
I had remote branches that would not go away even after they were deleted on the server. This tip about setting "Prune remote branches" worked for me. I found it here.
Go to Team Explorer, and click Home button. Then Settings > Repository Settings, and set "Prune remote branches during fetch" drop-down to True. Don't forget to click "Update" button to save your edit.
After changing the setting I did a fetch on one of the deleted branches and all of the deleted branches disappeared.