Adding sibling solutions into repository

518 Views Asked by At

I have done a bit of research but don't think the answers apply in my case.

I will try to explain. I have four project folders:

Folder1 Folder2 Folder3 Folder4

They are all individual projects with a solution in them.

Folder1 is what I consider my main project and I have set it up with source control.

The folder1 solution includes references to the other 3 solutions and therefore I can build all 4 solutions from the first one.

But, since the other 3 are outside folder1 they are not included in source control.

If I move the folders to make them sub folders of folder1 then all my build settings will be broken.

What is the simplest way to deal with this?

Update

I have now added source control to each of the other solutions but I don't quite understand the instructions here for adding sub modules:

https://tortoisegit.org/docs/tortoisegit/tgit-dug-submodules.html

Update

Having looked here I am not sure if submodules is really what I want. It seems that I will end up having double the data set. It might be best to have the 4 separate folders and manage the repositories independently.

2

There are 2 best solutions below

0
On BEST ANSWER

Maybe using git submodules might be a solution for you. Project 1 could be a parent project with the other projects as submodules.

1
On

I can think of two solutions:

  1. Put each solution in source control each in its own repo then use git's submodule feature.

  2. Release each solution as a library via your favorite library repository such as Maven, Ivy, etc. Then use the dependency management of your chosen tool.