Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a hidden directory in a repository

Tags:

git

I'm not sure my title is at all descriptive, so let me tell you the problem and even if you cannot solve it, maybe you can suggest a better title.

I have two programming teams. The in-house team has access to all the source code, of course, but the outsourced team is supposed to have access to everything, except one directory way down in the tree. There's proprietary stuff in there and those guys should not be able to see it, let alone change it. Ideally, they won't even be aware of its existence.

Maybe I should have two remote repositories, one with the common files and one with the proprietary stuff, but in that case, how do the developers created a mixed repository, where the root of one branch tracks from one remote and a directory deeper down tracks from another?

I can't believe I'd be the first person with the problem but I cannot even think of a way to phrase it for a good Google search.

like image 929
Michael Lorton Avatar asked Oct 24 '22 03:10

Michael Lorton


1 Answers

I suggest you to split your project into 2 different repositories and link them using a submodule.

This way you can just have a different set of permissions for each repository.

like image 181
jweyrich Avatar answered Oct 27 '22 09:10

jweyrich