git 工作项、拉取请求菜单在 Visual Studio 中不可见
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40749622/
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
Work Items, Pull Requests menu not visible in Visual Studio
提问by BrilBroeder
I'm using VSTS and Visual Studio enterprise on two different machines (both VS2015U3 on Win10). The project has a git-repository. On one machine I do have all expected menu's (https://www.visualstudio.com/en-us/docs/connect/work-team-explorer) on the other some (pull requests, work items) are missing. On both machines editing code and commiting/synching works fine.
我在两台不同的机器上使用 VSTS 和 Visual Studio Enterprise(Win10 上都是 VS2015U3)。该项目有一个 git-repository。在一台机器上,我确实有所有预期的菜单(https://www.visualstudio.com/en-us/docs/connect/work-team-explorer)在另一台机器上(拉请求,工作项)丢失。在两台机器上编辑代码和提交/同步工作正常。
Any suggestions ?
有什么建议 ?
回答by starian chen-MSFT
The reason is that you just connect to the local git repository and it likes this:
You configured Remotes (Home=>Settings=>Repository Settings=>Remotes), so you can commit and sync.
您配置了远程(主页=>设置=>存储库设置=>远程),因此您可以提交和同步。
Refer to these steps to connect to the remote repository.
请参阅这些步骤以连接到远程存储库。
回答by Deepesh Bajracharya
I had the same issue. It was resolved by re-connecting to the tfs-server. on VS 2017 Team Explorer go to 'Manage Connections' and 'Add Server'.
我遇到过同样的问题。通过重新连接到 tfs-server 解决了这个问题。在 VS 2017 团队资源管理器上,转到“管理连接”和“添加服务器”。
回答by Keenan Stewart
This happened to me after I upgraded Visual Studio 2017 to 15.6.2. I was able to push my changed to the server, commit, sync, etc. but for some reason when I tried to make a Pull Request, that option was not listed in Team Explorer. I searched and found this solution to help out. Still unsure why I could push/sync, but could not do a pull request since it said I was not connected to the TFS server.
这发生在我将 Visual Studio 2017 升级到 15.6.2 之后。我能够将我的更改推送到服务器、提交、同步等。但是由于某种原因,当我尝试发出拉取请求时,团队资源管理器中没有列出该选项。我搜索并找到了这个解决方案来提供帮助。仍然不确定为什么我可以推送/同步,但无法执行拉取请求,因为它说我没有连接到 TFS 服务器。
Once I reconnected, the Pull Request option re-appeared and I could make my Pull Request. Hope this help others.
一旦我重新连接,拉取请求选项重新出现,我可以提出我的拉取请求。希望这对其他人有帮助。
回答by Adam Cox
Steps using VS (Visual Studio) 2019:
使用 VS (Visual Studio) 2019 的步骤:
- Manage Connections > Connect to a Project...
- Expand server, and project to find the repo you want, then
- If it is already cloned, "Connect" should be the default option - click it!
- 管理连接 > 连接到项目...
- 展开 server, and project 找到你想要的repo,然后
- 如果它已经被克隆,“连接”应该是默认选项 - 单击它!
And why Microsoft doesn't just auto-magically do this bewilders me! I could sync and all, but no Pull-request until I jump through this little connect to the server/project/repo steps..
以及为什么微软不只是自动神奇地做到这一点让我感到困惑!我可以同步和所有,但没有拉请求,直到我跳过这个小连接到服务器/项目/回购步骤..
回答by Ronak Patel
I had the same issue. I was not able to create a Pull Request from Visual Studio. This started happening when I changed my computer password. The solution is that you connect again with your project.
我遇到过同样的问题。我无法从 Visual Studio 创建拉取请求。当我更改计算机密码时,这开始发生。解决方案是您再次连接到您的项目。