The situation is this:
We have a git repo on some server with one branch on it, let’s assume it’s master
. We clone that repo to our own machines and do things on it. Each of us have our own local branches, but when we push to the server, we always merge/rebase our local changes onto master
first, and then push to the server.
Everything is fine.
Now some other guys want to join the development. Therefore we decide to share our repo with them, except that one particular directory. What we want is some kind of mechanism, with which we can develop the project as usual (one branch on server, local branches for convenience), but when that “other guys” clone the project (maybe with some other clone command, or whatever proper command provided by the mechanism, we’ll teach them the command), they see all the content except that particular directory (or they can see the dir, but it’s empty, or they don’t have access), and they can also push their changes to the server, and have their own local branches, etc.
What’s the best way to achieve this? I don’t mind having multiple repos on the server.
I’ve been looking into submodule, and did some tests. The thing I don’t like about submodule is that I have to go into the submodule dir and add/commit/push etc (er… right?). Also I’m not sure how submodule will fit into our local branches workflow. Any suggestion are welcome.