简体   繁体   中英

Visual Studio Project files and the local Git repository

I'm starting to use Git and Git Hub with VS2019. However, i am somewhat confused on how my visual studio solution files are stored and what is stored in the local git repository.

According to this image https://i.stack.imgur.com/gi1RY.png . there should be two locations on my local PC where my solution files are stored. 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.

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.

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. But nothing is created under 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. The solution files are your local copy of the Git repository.

On Visual Stuido 16.8.1, you can change the default location of new projects in:

Tools > Options > Projects and Solutions > Locations .

You can also change the default location of new or cloned Git projects in:

Git > Settings > Git Global Settings .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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