Visual Studio Solution from multiple Git repositories
You can use submodules to realize it. Treat one repository as mainRepo and the other as subRepo.
- Based in the mainRepo and add the subRepo in it, use
git submodule add subRepo’s_URL
- Just make changes on files you want. You don’t need to pay attention to which repository the files are from
- In the local mainRepo, use
git commit –a –m ‘input your comment’
, and then modified files from mainRepo can be committed - In the subRepo (
cd [subRepoFolderName]
), you can also usegit commit –a –m ‘input your comment’
, so modified files from subRepo can be committed.
This may be different from want you thought, but it really saves you from which is the correct repository you want to update the changes in.
For more details about submodules, you can refer to here.