简体   繁体   English

什么是Visual Studio“本地Git存储库”?

[英]What are Visual Studio “Local Git Repositories”?

In Visual Studio, in Team Explorer's "Manage Connections" panel I can see remote TFS servers, and an other part, called 'Local Git Repositories'. 在Visual Studio中,在团队资源管理器的“管理连接”面板中,我可以看到远程TFS服务器以及另一部分,称为“本地Git存储库”。

However, if I run git --version in a cmd window, it looks like git is not installed on my machine. 但是,如果我在cmd窗口中运行git --version ,则好像git尚未安装在我的计算机上。

Hence the question: What are those 'Local Git Repositories'? 因此,问题是:那些“本地Git存储库”是什么?

Local Git repositories are those repositories that exist on your local drive but that are not connected to a remote TFS repository. 本地Git存储库是本地驱动器上存在但未连接到远程TFS存储库的那些存储库。

The way version control historically worked in Visual Studio is that everything went through TFS, since the TFVC (Team Foundation Version Control) was the way to do it from within Visual Studio. 从历史上讲,版本控制在Visual Studio中的工作方式是一切都通过TFS进行,因为TFVC(团队基础版本控制)是在Visual Studio中进行操作的方式。 When they added support for Git, they had to accommodate that Git is not tied to TFS: It's perfectly fine that people have a repository somewhere on their local drive that may or may not be connected to any kind of remote repository. 当他们增加了对Git的支持时,他们不得不适应Git不与TFS绑定的问题:很好,人们在其本地驱动器上的某个地方有一个存储库,该存储库可以连接也可以不连接到任何远程存储库。 So Visual Studio needed a way to work with those. 因此,Visual Studio需要一种使用这些方法的方法。

That's what the “local Git repositories” are: Repositories you have, that Visual Studio does not have a special treatment for (like work item integration etc.). 这就是“本地Git存储库”的含义:您拥有的存储库,Visual Studio没有对其进行特殊处理(例如工作项集成等)。

Note that Visual Studio will still work with those repositories using their internal Git client. 请注意,Visual Studio将仍然使用自己的内部客户端的Git仓库的那些工作。 So you are not required to install Git yourself to use it from Visual Studio; 因此,您不需要自己安装Git即可在Visual Studio中使用它。 and actually, if you want to use Git from the command line, you will have to install it yourself. 实际上,如果要从命令行使用Git,则必须自己安装。

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

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