TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Branching strategies for monorepos, what is your approach?

2 点作者 floppydisc将近 2 年前
Having stumbled upon Git Flow and the wonders of monorepos, I do wonder how to best implement a Git Flow like branching strategy for the monorepo. Branching fundamentally seems to fit better for polyrepos or repos with a single project. Have you come up with a branching strategy for monorepos and if so, what is it?

3 条评论

jstx1将近 2 年前
Have short-lived branches for whatever change you&#x27;re making, merge into main, repeat.<p>Is there a problem with this? Seems too obvious to even call it a strategy.
评论 #36261175 未加载
onetimePost将近 2 年前
In my experience the traditional branching strategies work for monorepos for continuous integration.<p>For continuous deployment the circumstance is a little different since you may not want continuously deploy every app if there are changes that don&#x27;t affect all apps.<p>For example, supposing a monorepo that contains source for three separate apps A, B, C. If a branch contains changes for app A only, when merged, you may not want to redeploy all apps, but only affected apps. In this case you may want to organize a conditional deployment model instead of a continuous model. If you CICD system is tied to branches, and branch events, you may need to organize a separate release branch modeling along side the preexisting integration model.
shoo将近 2 年前
<a href="https:&#x2F;&#x2F;trunkbaseddevelopment.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;trunkbaseddevelopment.com&#x2F;</a><p><a href="https:&#x2F;&#x2F;yosefk.com&#x2F;blog&#x2F;dont-ask-if-a-monorepo-is-good-for-you-ask-if-youre-good-enough-for-a-monorepo.html" rel="nofollow">https:&#x2F;&#x2F;yosefk.com&#x2F;blog&#x2F;dont-ask-if-a-monorepo-is-good-for-y...</a>