Structuring related components in git

The criteria for combining different set of files in one “component” (here one Git repo) is their respective development lifecycle (the way they evolve in term of labelling and branching):

  • can you make evolution on php or java module without having to make any modifications to other modules (like the obj c ones)?
  • can you isolate in a branch some evolutions/fixes which are only made for one of those modules and not the others?
  • can you reuse a specific version of one of those modules in several projects?

If yes, a component-based approach is best (i.e. one git repo per module), as opposed to one repo with everything in it (system approach).
See for instance “Component based web project directory layout with git and symlinks“.

A component represent a “coherent set of files” and is best managed in its own Git repo.

Leave a Comment