[英]Visual Studio Project files and the local Git repository
I'm starting to use Git and Git Hub with VS2019.我开始在 VS2019 中使用 Git 和 Git Hub。 However, i am somewhat confused on how my visual studio solution files are stored and what is stored in the local git repository.
但是,我对如何存储 Visual Studio 解决方案文件以及存储在本地 git 存储库中的内容有些困惑。
According to this image https://i.stack.imgur.com/gi1RY.png .根据这张图片https://i.stack.imgur.com/gi1RY.png 。 there should be two locations on my local PC where my solution files are stored.
我的本地 PC 上应该有两个位置存储我的解决方案文件。 In the "Development workspace" which is under c:\\Dev<Solution name> and in the "local Git Repo" which is C:\\Users<My UserName>\\source\\repos.
在 c:\\Dev<Solution name> 下的“开发工作区”和 C:\\Users<My UserName>\\source\\repos 下的“本地 Git Repo”中。
However, when i create a new solution on my workstation the solution location is defaulting to the Repo location C:\\Users<My UserName>\\source\\repos.但是,当我在工作站上创建新解决方案时,解决方案位置默认为 Repo 位置 C:\\Users<My UserName>\\source\\repos。
So that is he only location my code is stored.所以这是他唯一存储我的代码的位置。
If i change the locaton for my solution back to c:\\Dev<Solution name> a .git folder is created in this new locaton.如果我将解决方案的位置更改回 c:\\Dev<Solution name>,则会在此新位置中创建一个 .git 文件夹。 But nothing is created under C:\\Users<My UserName>\\source\\repos.
但是在 C:\\Users<My UserName>\\source\\repos 下没有创建任何内容。
Is this right or am i missing the point ?这是正确的还是我错过了重点? There appears to only be one location for my solution files.
我的解决方案文件似乎只有一个位置。
Erick埃里克
Yes, a local Git repository and its associated solution files are one and the same - in the same location.是的,本地 Git 存储库及其关联的解决方案文件是一回事 - 位于同一位置。 The solution files are your local copy of the Git repository.
解决方案文件是您的 Git 存储库的本地副本。
On Visual Stuido 16.8.1, you can change the default location of new projects in:在 Visual Stuido 16.8.1 上,您可以在以下位置更改新项目的默认位置:
Tools > Options > Projects and Solutions > Locations .工具 > 选项 > 项目和解决方案 > 位置。
You can also change the default location of new or cloned Git projects in:您还可以在以下位置更改新的或克隆的 Git 项目的默认位置:
Git > Settings > Git Global Settings . Git > 设置 > Git 全局设置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.