Home > Enterprise >  Separate projects and make one way directional features sharing
Separate projects and make one way directional features sharing

Time:01-17

As I am new to Git, i need some advise with this. I have a main project that is runnable on its own and inside it there is a folder that is considered as a sub-project. I can run and have a separate executable for each.

I did my search and only found this answer, enter image description here

Is that possible and if so how it could be done?

CodePudding user response:

One possible avenue would be to declare the project1 repository as a submodule of project2.

That means:

  • project1 no longer has a project2 subfolder (and ignore project2 existence)
  • project2 has a project1 subfolder, which helps project2 to build itself, picking from the project1 subfolder the features it needs.
  • Any edit in that project2 will not to be included in project1
  • Related