我正在使用 Visual Studio 2017 和 GIT。
我可以连接到 GIT 项目、分支并提取代码。
但是当在远程服务器上创建新分支时,在 Visual Studio 分支部分中看不到它。
如何在Visual Studio中从远程服务器查看新的GIT分支?
最佳答案
团队资源管理器 View ( you can see here ) 应向您显示 remotes/origin
下的那些分支。
但是你需要fetch first ,然后才能在该部分中看到它们。
(图片来自“Git Fetch Upstream en Visual Studio 2017 ”)
(这是上游的示例,但在您的情况下,选择origin
)
这假设您的本地存储库 uses the default refpect
[remote "origin"]
url = https://github.com/schacon/simplegit-progit
fetch = +refs/heads/*:refs/remotes/origin/*
这将获取所有分支,包括远程存储库上新创建的分支。
关于git - 如何在Visual Studio中从远程服务器查看新的GIT分支?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58246384/