Is there an established way to share part of the code of a project (that resides on a branch or on its own repository) with a customer?
What I'm trying to solve:
There's different models how our customers might get access to the source code:
Given that we use git and internal gitorious for interal development, I can handle the first two cases really easily:
What I'm really wondering about is the third case.
Internally everyone sees everything and we share all the code.
However, we don't want the customers to see everything, but rather only their version of the software.
Is there a known-to-work way of doing this for instance with two repositories (i.e. "our repo" and "customer repo"), with hooks that push in and out changes as they trickle in either from our side or the customer side?
You could have one --bare repository which contain e.g. a master branch, which the developers in step 3 work against. Locally you could have another bare repository, which only you work with. In it you can have any number of branches to collaborate with and hide from your customers.
As soon as some external developer have pushed something to the first repo, you can pull these changes and push to your local --bare repo, and as soon as you want to share code externally you just push to e.g. the master on the common repo.
Edit: With you I mean you as your organization and with local I mean your local network, or local to your organization.