Visual Studio: Remove deleted branches on GIT fetch

Something small and easy but useful.
I always google it when I setup a new Dev environment.

If you are also working with Visual Studio and its built in GIT integration, then you have noticed that the remote branches shown under the Branches tree in the Team Explorer, are only increasing. Even some of the branches have been deleted from the remote server that have not been reflected to the tree.

This can be fixed by an easy configuration.
Open Team Explorer, then go to Home -> Settings -> Repository Settings and set the “Prune remote branches during fetch” to True.
Then press Update.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s