Visual Studio Solution from multiple Git repositories

You can use submodules to realize it. Treat one repository as mainRepo and the other as subRepo.

  1. Based in the mainRepo and add the subRepo in it, use git submodule add subRepo’s_URL
  2. Just make changes on files you want. You don’t need to pay attention to which repository the files are from
  3. In the local mainRepo, use git commit –a –m ‘input your comment’, and then modified files from mainRepo can be committed
  4. In the subRepo (cd [subRepoFolderName]), you can also use git 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.