Reputation: 304494
Suppose I have a repo with some sections I want to share with different people.
myproject/
internal-stuff/
shared-1/
shared-2/
...
internal-stuff
doesn't get sent out; Customer 1 collaborates on shared-1
, Customer 2 collaborates on shared-2
, etc.
If shared-1
, shared-2
, etc were separate repos, I could push and pull in the usual way.
How do I do this on partial contents of a repo?
Upvotes: 0
Views: 68
Reputation: 693
You can create git submodules for shared-1 and shared-2. Then create a branch in the submodule and just keep the required folder and delete the rest. You can then manage that branch instead.
If you want to push up your changes, you should be able to back merge first. It will be like keeping feature branch current by merging in things from a main branch where everyone is merging their latest changes.
Upvotes: 1