繁体   English   中英

如何在 Visual Studio 中从远程服务器查看新的 GIT 分支?

[英]How to view the new GIT branch from remote server in visual studio?

我正在使用 Visual Studio 2017 和 GIT。

我可以连接到 GIT 项目,分支并拉取代码。

但是当在远程服务器上创建一个新分支时,它在 Visual Studio 分支部分是看不到的。

如何在 Visual Studio 中从远程服务器查看新的 GIT 分支?

Team Explorer 视图( 您可以在此处查看)应该向您显示remotes/origin下的那些分支。

但是您需要先获取,然后才能在该部分中看到它们。

http://sofes.miximages.com/git/nBNIR.png

(图片来自“ Git Fetch Upstream en Visual Studio 2017 ”)

(这是上游的示例,但在您的情况下, select origin

这假设您的本地存储库使用默认的 refpect

[remote "origin"]
    url = https://github.com/schacon/simplegit-progit
    fetch = +refs/heads/*:refs/remotes/origin/*

这将获取所有分支,包括远程存储库中新创建的分支。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM