|
|
|
|
|
by alexhayes
2962 days ago
|
|
I'm unsure why most folks seem to get into a pickle over git submodules but I think it's essentially due to the mental model of how they think about the structure of the "root" project and it's relation to the submodules. This in turn seems to govern how they work with the root project and it's submodules. I kind of think of the relationship as a pointer into what should be a entirely separately managed project. Changes to that project should happen in that project and only then should the "pointer" be modified. I usually go as far as checking out the submodule separately (to my "projects" directory) when I need to work on it, which of course entirely unnecessary, but for me helps keep that separation. Another approach I've found that helps to combat issues some people have with them is to not have them littered throughout a project but have a very clear delineation between what are submodule and "root" project git managed files - ie. an appropriately named, usually top level, directory. In practice I find them an extremely useful way of getting stuff done effectively and efficiently! |
|