Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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.

like image 544
user1431368 Avatar asked Sep 05 '25 07:09

user1431368


1 Answers

What about using a branch for each project, and using child branches as git-flow branches with proper namespacing? For example; there's a branch named project#1 for a project, which is analogous to master, and has child branches named project#1-develop, project#1-hotfix#11, and so on. Also you can have the single master branch into which you merge the project branches at releases.


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!