'Centralize git repos and modules
Git is great, and one of them is modules, but with the time, this ends happening.
Proj1
Proj2
Proj1 as submodule
Proj3
Proj1 as submodule
Proj4
Proj2 as submodule
Proj3 as submodule
And this start increasig a lot, the problem here, is not the structure, is the space, if proj1 uses 4GB (proyect + changes data), and I have all projects, proj1 will be cloned as submodules in proj2, 3 and 4....
Git stores all the changes, so, is there a way to centralize this data? like
~/.git/proj1_changes
~/.git/proj2_changes
~/.git/proj3_changes
~/.git/proj4_changes
~/Docs/Proj1 (for checkout or similar access to ~/.git/proj1_changes)
~/Docs/Proj2 (similar above)
~/Docs/Proj3 (similar above)
~/Docs/Proj4 (similar above)
When checking, using, dev, even not too much projects, this happens, and yes, there is big projects...
Is there some way to do this? or a different solution?
Edited:
Lets think, we don't own all the projects, there is a lof of projects in git that uses others as modules, and cause this too.
Solution 1:[1]
One solution to this problem is to create a mono repo where all of your code for all of your projects is in a single git repo. Many of the large technology companys do this. Microsoft, Google, and others have developed tools to help them manage their mono repos. I'm just starting to learn about this so don't have much more information other than this.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Code-Apprentice |
