We are developing a library (MyLib) which includes two modules, say Module_1 and Module_2.
The folder structure is as follows.
MyLib
|
---------------
| |
Module_1 Module_2
There is a manager who is responsible for the release and version control of MyLib. Two independent teams are developing the two modules. Module_1 depends on Module_2 and vice versa.
We would like to maintain independent version controls for MyLib, Module_1, and Module_2.
We can maintain a git repo on MyLib so that the Manager can have version control on MyLib. An ideal configuration we can think of is as follows.
MyLib
|
----------------------------
| | |
Module_1 Module_2 .git
| |
.git .git
Now, how to configure the independent git modules for Module_1 and Module_2 so that each team can independently go back to any previous versions?
For example, the team developing Module_1 will be using a particular version of Module_2 and they should be able to go back to this particular version of Module_1 and Module_2 from its git repo at any future date.
I found that including a Folder outside the git repo is not straight forward.
For me, our situation is a common scenario for any library which has multiple modules developed by independent teams and have dependency on each other modules.
Can somebody throw light on handling this type of scenario?
I checked git submodules. But I don’t think it is the right choice for our use case.