同一存储库中多个项目的分支模型?
Branch model for multiple projects in the same repository?
我们最近从 CVS 切换到 Git,并使用 Vincent Driessen 的 successful Git branching model 和一个 master
分支和一个合并回 [=] 的 develop
分支10=]。我们从 Git 中的一个项目开始,现在我们有两个单独的项目使用子模块 (common
) 中的一些公共代码。最近另一个项目提交了对 develop
的更改,我们没有为此做好准备,并且在我们更新自己的代码之前,我们无法将任何更改提交回 develop
,因为我们不希望其他变化。
我考虑过将 develop
分支到特定于项目的分支,然后合并回 develop
,但是 common
的所有者不想要特定于项目的分支,因为:
we’ll have to cherry pick commits from the main develop
branch in
order to obtain fixes or features that apply to both.
完全消除 develop
分支并直接从项目特定分支合并回 master
会更好吗?还是我们做错了?
Recently the other project committed a change to develop that we aren't prepared for, and until we've updated our own code, we cannot commit any changes back to develop because we don't want the other changes.
这意味着这两个项目有不同的开发生命周期,应该有各自的开发分支。
但是如果 common
不能被两个项目轻松更新,这意味着你必须自己更新 common
(在它自己的项目特定分支中)
在将你的 develop
分支合并到主 develop
分支之前,你需要将 common
从主 develop
分支合并到你的 common
,解决任何冲突,并合并回 common
。
这样,common
项目所有者就不必挑选或集成任何东西。
我们最近从 CVS 切换到 Git,并使用 Vincent Driessen 的 successful Git branching model 和一个 master
分支和一个合并回 [=] 的 develop
分支10=]。我们从 Git 中的一个项目开始,现在我们有两个单独的项目使用子模块 (common
) 中的一些公共代码。最近另一个项目提交了对 develop
的更改,我们没有为此做好准备,并且在我们更新自己的代码之前,我们无法将任何更改提交回 develop
,因为我们不希望其他变化。
我考虑过将 develop
分支到特定于项目的分支,然后合并回 develop
,但是 common
的所有者不想要特定于项目的分支,因为:
we’ll have to cherry pick commits from the main
develop
branch in order to obtain fixes or features that apply to both.
完全消除 develop
分支并直接从项目特定分支合并回 master
会更好吗?还是我们做错了?
Recently the other project committed a change to develop that we aren't prepared for, and until we've updated our own code, we cannot commit any changes back to develop because we don't want the other changes.
这意味着这两个项目有不同的开发生命周期,应该有各自的开发分支。
但是如果 common
不能被两个项目轻松更新,这意味着你必须自己更新 common
(在它自己的项目特定分支中)
在将你的 develop
分支合并到主 develop
分支之前,你需要将 common
从主 develop
分支合并到你的 common
,解决任何冲突,并合并回 common
。
这样,common
项目所有者就不必挑选或集成任何东西。