Structured releases (Git flow) for multiple projects in a single repository (monorepo)

时间:2015-07-31 19:54:46

标签: git git-flow

I'm using Git Flow with multiple projects, each with their own repository, successfully.

I'm looking to merge these repositories into a single monorepo. The main reason being shared dependent projects across multiple projects, which, currently means we need to commit fixes across multiple repositories (see: cross-project changes in the link above).

Facebook and Google seem to successfully use this model (see: this fb talk, and this google talk).

How can I keep using something similar to Git Flow while utilizing a single repository for multiple projects?

While useful, the talks I've linked to don't go into details like branching and tagging, and how they organize different project releases from a single trunk/master.

I'm not married to Git Flow. I'm looking for how to structure releases in a monorepo.

1 个答案:

答案 0 :(得分:1)

如何为每个项目使用分支,并使用子分支作为具有正确命名空间的git-flow分支?例如;对于项目,有一个名为project#1的分支,类似于master,并且具有名为project#1-developproject#1-hotfix#11的子分支,依此类推。您还可以拥有单个master分支,您可以在其中合并项目分支。