Question

We have a big angular project that works with several APIs provided by other projects. This project has a common part that is shared by all. It includes smaller sections dedicated to different teams and back end APIs.

My question is "How to divide these sections into different teams through the git so that each team has access only to its own and shared sections"

Is the git submodules a good way to do this?

Was it helpful?

Solution

Usually you would want each team to be creating npm packages for their modules, and the other teams npm install those packages. This lets your inter-team dependencies be managed by the same process and tools as your third-party dependencies. This is a little more work up front, but easier to manage in the long run.

Git submodules can be used to accomplish what you want, but it can lead to problems like one team using a commit of another team's module that the other team doesn't consider "released." It's also harder to resolve situations like when you depend on a and b, which both depend on different versions of c. Submodules are mostly useful as a temporary measure when migrating from a subversion-style repo with a build system designed accordingly.

Licensed under: CC-BY-SA with attribution
scroll top