Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2013 remove deleted git branches

I am having this problem where in VS2013 when I create a new branch from origin, the dropdown with the source branches lists ALL branches ever created. This includes branches that have long been deleted from both the local repo and the remote/origin repo.

http://imgur.com/uxPZjVL

How do I remove the deleted branches?

like image 660
Ravenheart Avatar asked Oct 18 '22 06:10

Ravenheart


1 Answers

Visual Studio keeps these in a local cache.

You can run the following from a command prompt, then whenever you do a fetch from the Sync menu in Team Explorer, the branches will be pruned:

git config remote.origin.prune true

Seems like this should be set by default!

If you want to apply this system wide, you can use this:

git config --global remote.origin.prune true
like image 92
Karl Gjertsen Avatar answered Oct 21 '22 06:10

Karl Gjertsen