How to reach lower with git?

Problem Statement

The entire code base has been available to all so far. Now I need to ensure that people receive the code of only those modules that they will work on, and for other modules they will receive a library, as in lib. Suppose we have two modules right now

thinkbot (HEAD)

-> assemblebot (tree / subdir)

-> include -> source -> lib -> obj 

-> vpl (tree / subdir)

  -> include -> source -> lib -> obj 

-> enable

-> source → bin`

Now, if someone is working on the vpl module, he will get the source folder and the source folder containing the code, and he will get lib from the assemblebot module. Therefore, when he makes changes and compiles from HEAD, everything will work from him.

Guys how to implement this in Git? Pointers to What to Read? Would team comments be great?

+4
source share
1 answer

Right now, the only way I can think of is to use submodules . Each of the two modules (assemblebot, vpl) will be a submodule, and the rest of the tree will be in a superproject.

This essentially means that the two modules must be in separate repositories, and then in the main repository you git submodule init git://foo.com/assemblebot.git .

I'm not sure if this is worth the effort as a whole. This is not one of git's strong points (this is actually the only thing that I think needs to be improved).

Improved support for partial checks in the work ( narrow and rare clones.)

Edit: given that vpl and assembbot are dependent on include and source, it might be better to include the source as vmod and assemblebot repository submodules. However, these are not separate projects, but what git does is to track the contents of the project. I see no reason why these modules should be separated. Maybe just ask the developers not to touch another code?

+8
source

All Articles