How to organize git in projects with overlapping dependencies? -


currently working on converting monolithic svn repository (all applications , libraries in single repository) c++ code git repository. have organize libraries , applications in own repository.

i am, however, struggling find way handle internal (i.e. our own code) , overlapping dependencies. problem exists because many libraries , applications depend on each other - quite deep.

for instance, imagine following (quite simple) project structure:

  • app1 depends on lib1 lib2
  • lib1 depends on lib2 lib3
  • lib2 depends on lib3
  • lib3 not have dependencies

app1 game, lib1 graphics library, lib2 math library , lib3 utility library. keep in mind libraries used in many other applications , updated.

ideally want have situation following directory structure when clone app1:

  • app1
    • libs
      • lib1
      • lib2
      • lib3

and following when clone, instance, lib2:

  • lib2
    • libs
      • lib3

i have thought using git subtree or submodules, whereby each project records own dependencies. however, project directory layout become (for readability removed in-between libs directory):

  • app1
    • lib1
      • lib2
        • lib3
      • lib3
    • lib2
      • lib3

as can see lib3 , lib2 placed in project multiple times. not desirable.

i solve writing custom script each application , library clones relevant dependent repositories. when becomes difficult keep track of exact state of code @ specific commit.

is there way handle internal , overlapping dependencies git? or struggling because trying achieve goes against way of doing things in git?


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -