How to update remote branches using Visual Studio Git?


Recently, I have pushed my code from local git to azure-devops, but after pushing code and clicking on "Fetch" doesn't update my local branches, it should have two branches dev & master but showing only one.

So, How can I update branches locally to show dev and master in my Visual Studio 2017 Git?


Asked by:- jaya
0
: 205 At:- 10/12/2018 8:35:31 AM
Visual-studio Visual-studio-2017 git-branches-not-updated-in-visual-studio






1 Answers
profileImage Answered by:- neena

You may have to save settings in your Visual Studio "Team Explorer" to always prune on fetch (then fetch branches again from a remote server), to do that follow these steps:

  1. Click on "Team Explorer" Window in your Visual Studio
  2. Then Click on "settings"
  3. Now from the Menu Options Select "Global Settings"
  4. In the Global settings window, Set "Prune remote branches during fetch" to "True"
  5. Click "Update".
    visual-studio-not-pulling-all-remote-branches-min.png
  6. Once you have followed the above steps, open solution in Visual Studio, click "Team Explorer"-> Select "Sync"-> Select "Fetch" in synchronization tab.

You should now see updated remote branches now.

2
At:- 10/17/2018 9:21:00 AM
Thanks, it worked for me, I wasn't aware about to make "True " to always prune remote branches on fetch options. 0
By : jaya - at :- 10/22/2018 2:50:33 PM





Login/Register to answer
Or
Register directly by posting answer/details

Full Name *

Email *




By posting your answer you agree on privacy policy & terms of use

Related Articles

Subscribe Now

Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly