There is something not clear for me and this is how to prevent other people read my code. The thing is that I want people create their own branches but not to view the other's branches. If someone is responsible for networking, I don't want this guy to view graphics codes. S/He must be forced to work on his branch only.
closed as off-topic by maple_shaft♦ Jul 12 at 23:33
- This question does not appear to be about software development within the scope defined in the help center.
You could let each individual create their section of the code in a submodule and then include all of the submodules into the main project. This would add a lot of complexity to the whole process though.
You create a submodule just as you would a normal repo and include it in the main repo like so:
The main question is why do you need to enforce this level of isolation and what happens if one part of the project has a dependancy on another one?
As the questioner has indicated that they want to protect IP from third party espionage action I have the following suggestion:
In stead of extracting the code for each person into a separate repository tree have the main IP that you want to keep separate contained in a "black box" library and have the development of that take place on a private repository by trusted developers. The untrusted developers can then develop the code that consumes this library in a less restricted repository.
This approach would have the advantage of requiring fewer repositories which will hopefully ease the process of development somewhat.