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:
- most of our customers do not care about the source code, but about the built software
- some care about the source code, their release was built from
- some actually have developers that are programming along with us to add features to the project.
Given that we use git and internal gitorious for interal development, I can handle the first two cases really easily:
- Give them a package with the built software
- Give them a package with the software along with a tarball of the code that yielded that software.
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 re开发者_开发知识库po"), 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.
I think you can set up two repositories that are mirrors. Each of these would be added as two remotes to your developer sandboxes. One would be for customer
and the other for internal
.
You'd have to have some policy of pushing only some branches to the customer
remote and then let them clone and work only on that.
精彩评论