I am starting to use Visual Studio 2013 with the built-in Git Team Explorer tools using Visual Studio Online. I am very familiar with how to do this via the Git Shell but cannot seem to figure out how to do this via the VS 2013 interface.
I am trying to pull a remote branch locally and am unable to do so. Via command line, I would do:
git fetch -a
git checkout <branchName>
I understand the workflow is to create a local branch that tracks the remote branch; however, my remote branch list in the dropdown is not complete. How do I perform this action which mimics git fetch -a
?
Below is a picture:
Open the Team Explorer and open the Sync view. Then select the Pull link under Incoming Commits to pull remote changes and merge them into your local branch. Pulling updates files in your open project, so make sure to commit your changes before pulling. In Team Explorer, select the Home button and choose Sync.
To view your remote branches, simply pass the -r flag to the git branch command. You can inspect remote branches with the usual git checkout and git log commands. If you approve the changes a remote branch contains, you can merge it into a local branch with a normal git merge .
Find the remote branch in remotes -> origin , then double-click that branch to get it selected locally.
To perform the equivalent of git fetch
from the Git Team Explorer tools with Visual Studio 2013, you have to:
Now, your remote branch list will be up to date and you can create a new branch that tracks the origin/dev
branch
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With