Git/gitorious:与客户共享某些分支/存储库的方式

发布于 2024-10-19 10:49:38 字数 521 浏览 4 评论 0原文

是否有一种既定的方法来与客户共享项目的部分代码(驻留在分支或其自己的存储库上)?

我想要解决的问题:

我们的客户访问源代码的方式有不同的模式:

  1. 我们的大多数客户不关心源代码,但关于构建的软件,
  2. 有些人关心源代码,他们的版本是构建的实际上
  3. ,有些开发人员正在与我们一起编程,为项目添加功能。

鉴于我们使用 git 和内部 gitorious 进行内部开发,我可以非常轻松地处理前两种情况:

  1. 给他们一个包含构建软件的包
  2. 给他们一个包含该软件的包以及生成该软件的代码的 tarball。

我真正想知道的是第三种情况。

在内部每个人都可以看到一切,我们共享所有代码。

但是,我们不希望客户看到所有内容,而只想看到他们的软件版本。

是否有一种已知的工作方法可以做到这一点,例如使用两个存储库(即“我们的存储库”和“客户存储库”),并使用钩子在更改从我们这边或客户那边流入时推送和推出更改?

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:

  1. most of our customers do not care about the source code, but about the built software
  2. some care about the source code, their release was built from
  3. 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:

  1. Give them a package with the built software
  2. 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 repo"), with hooks that push in and out changes as they trickle in either from our side or the customer side?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

メ斷腸人バ 2024-10-26 10:49:38

您可以拥有一个 --bare 存储库,其中包含例如 master 分支,开发人员在步骤 3 中使用该分支进行工作。在本地,您可以拥有另一个裸存储库,只有您可以使用它。在其中,您可以拥有任意数量的分支机构来与客户协作并隐藏客户。

一旦一些外部开发人员将某些内容推送到第一个存储库,您就可以拉取这些更改并推送到本地 --bare 存储库,并且一旦您想在外部共享代码,您只需推送到公共存储库上的 master 。

编辑:对于,我的意思是您作为您的组织,对于本地,我的意思是您的本地网络,或您组织的本地网络。

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.

终陌 2024-10-26 10:49:38

我认为你可以设置两个镜像存储库。其中每个都将作为两个遥控器添加到您的开发人员沙箱中。一个用于客户,另一个用于内部

您必须制定一些策略,仅将某些分支推送到 customer 远程,然后让它们克隆并仅在该分支上工作。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文