Visual Studio 2013 git,仅列出 Master 分支
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24919907/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Visual Studio 2013 git, only Master branch listed
提问by Vimes
I'm using Visual Studio 2013's Git support to work on a private GitHub repository. I have permission to commit to it. I want to switch branches, but when I go to the Branches view, the only branch in any of the lists (branch drop-down, published branches, merge tool) is master. Other branches show up in GitHub, GitHub for Windows, and TortoiseGit. So I know they're there and I have access.
我正在使用 Visual Studio 2013 的 Git 支持来处理私有 GitHub 存储库。我有权承诺。我想切换分支,但是当我转到分支视图时,任何列表(分支下拉菜单、已发布分支、合并工具)中唯一的分支是 master。其他分支出现在 GitHub、GitHub for Windows 和 TortoiseGit 中。所以我知道他们在那里并且我可以访问。
Any ideas why I can't see other branches in Visual Studio?
为什么我在 Visual Studio 中看不到其他分支的任何想法?
I'm running Visual Studio 2013 Update 2.
我正在运行 Visual Studio 2013 更新 2。
回答by Edward Thomson
The branch dropdown will only show localbranches, it will not show remote branches. You should create a new local branch to track that remote branch. Simply click the New Branch dropdown, and you will see all the remote branches:
分支下拉菜单只会显示本地分支,不会显示远程分支。您应该创建一个新的本地分支来跟踪该远程分支。只需单击 New Branch 下拉菜单,您将看到所有远程分支:
Once you've done that, this will appear as a "published branch" allowing you to push and pull to it.
完成此操作后,这将显示为“已发布分支”,允许您推和拉到它。