简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM