Monday, March 15, 2021

Refresh the list of remote branches in Visual Studio Team Explorer Visual Studio 2017/2015/2019

 Visual Studio 2019


By default the Visual Studio Team Explorer does not refresh the remote branches when you fetch updates from the server. The fix for this is pretty easy, you need to set "Prune remote branches during fetch" to true in the "Git Settings". You can do this in the global settings or per repository.

  • Go to Team Explorer settings
  • Select either "Global Settings" or "Repository Settings"
  • Set "Prune remote branches during fetch" to true

Prune remote branches during fetch And your done, now the remote branches will be updated every time you fetch or pull.

Visual Studio 2015/2017 - Refresh remotes/origin

  • Right-click on your local repo and select Open Command Prompt
  • run git fetch --prune   

No comments: