Visual Studio 2013 - Git - 获取远程分支 [英] Visual Studio 2013 - Git - Fetch remote branches
问题描述
我开始使用Visual Studio 2013和内置的使用Visual Studio Online的Git Team Explorer工具。我非常熟悉如何通过Git Shell来做到这一点,但似乎无法弄清楚如何通过VS 2013界面来做到这一点。
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>
我的工作流程是创建一个跟踪远程分支的本地分支;但是,下拉列表中的远程分支列表不完整。我该如何执行这个模仿 git fetch -a
?
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:
推荐答案
相当于使用Visual Studio 2013从Git团队资源管理器工具获取 git fetch
,您必须:
To perform the equivalent of git fetch
from the Git Team Explorer tools with Visual Studio 2013, you have to:
- 转到 未定义提交 标签
- 切换到具有远程跟踪功能的分支(我总是使用master)
- Go to the Unsynced Commits tab
- Switch to a branch that has remote tracking (I always use master)
- Click Fetch under the Incoming Commits section
现在,您的远程分支列表将是最新的,您可以创建一个新分支来跟踪 origin / dev
分行
Now, your remote branch list will be up to date and you can create a new branch that tracks the origin/dev
branch
< img src =https://i.stac k.imgur.com/XYc6r.pngalt =在这里输入图片描述>
这篇关于Visual Studio 2013 - Git - 获取远程分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!