简体   繁体   中英

Problems adding Visual Studio 2015 project to Source control

I have a solution with two projects in it. One of them is added to source control, but the other is not. They are in different folder paths (let's say project that is added to source control is in PATH-TRACKED , but the other in the PATH-UNTRACKED ).

What is a correct way to get that untracked project to the git repository folder PATH-TRACKED so that I don't brake my solution? By moving to the PATH_TRACKED I could add it to source control, but then I would brake the references to that project, right? What is the recommended way to do this task?

As a result I want to have both projects in the same repository

Git is quite good at following file because its file detection is based on the content. So, if you don't modify the content of the files in the same time you move your files, their should be no problem.

So, move the untracked folder into your repository and move the other directory in a sub folder, if needed, and all should be go well! Just do it without introducing other changes (especially in the content of the files). Do it in one or two commit if you find it clearer...

Anyway, if the commit you end with do not suit you, git reset and do it again (or even better, amend it)... No need to worry. Here, git is not the problem but perhaps you will have to update some files (sln or csproj) to make all that build :(

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