Problem statement
The entire codebase was accessible to everyone till now. Now I need to enforce people get code of only those modules which they will work on, for other modules they will get a library as in lib. Assuming we have two modules right now
thinkbot (HEAD)
-> assemblebot (tree/subdir)
-> include
-> source
-> lib
-> obj
-> vpl (tree/subdir)
-> include
-> source
-> lib
-> obj
-> include
-> source -> bin`
Now if someone is working on vpl module he will get include and source folder containing the code and from assemblebot module he will get a lib. So when he makes changes and compiles from HEAD things will work out from him.
Guys how do I implement this in Git ? Pointers on What to read ? Command snippets would be great ?
At the moment, the only way I can think of is by using submodules. The two modules (assemblebot, vpl) would each be a submodule, and the rest of the tree would be in the super project.
This essentially means that the two modules would have to be in separate repositories, and then in the master repository you git submodule init git://foo.com/assemblebot.git
.
I'm not sure that this is worth the effort overall. It's not one of git's strong points (in fact it's the only thing I think needs improvement).
Better support for partial checkouts is in the works (narrow and sparse clones).
Edit: Considering that vpl and assemblebot depend on include and source, perhaps it's better to have include and source as submodules of the vpl and assemblebot repositories. However, these aren't separate projects, and what git does is track project content. I don't see a reason why these modules should actually be separated. Maybe just tell the developers not to touch the other's code?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With