How to handle shared projects in multiple repos Git VisualStudio Solutions

Viewed 1630

How to handle shared projects in multiple repos Git VisualStudio Solutions?

For instance I have 3 projects:

  1. Project_1
  2. Project_2
  3. CommonSharedProject

Earlier in TFS, I use to have a single repository (Generics) for all the project thus it was easy for me to share "CommonSharedProject" between the other two.

Now I have created 2 different Git Repository, i.e a.

  1. Generic.Sender(contains Project_1)
  2. Generic.Reciever(contians Projetc_2)

Now how to handle "CommonSharedProject"?

  • 1st approach is that I can create one more repo for this and create NuGet packages for the common codes. But doing so will consume extra time and effort in doing minor changes. Please suggest some good approach.
1 Answers

Use Git submodules or subtrees. A submodule is basically a pointer to a remote repository within an existing repository.

Related