使用git分支与多个存储库的好处 [英] Benefits of using git branches vs. multiple repositories
问题描述
我们的代码使公司的产品自动化并同步到特定产品版本。
目前,我们有1个大的Git仓库,里面有多个分支 - v1.0,v1.1,v2.0(版本1.0的自动化在v1.0分支,等等)。
在具有分支的单个存储库中使用这些版本的优点和缺点与将每个版本代码保存在单独的存储库中有什么区别? / strong>
这两种解决方案都可以工作,我所寻找的答案是两种方法的优点/缺点列表。
我知道许多团队正在使用分支来隔离开发中的临时阶段,例如修复错误或新功能,将工作归并到主要开发分支中结束。
我知道的其他工作模式是有不同的分支用于开发,发布等,以将clea这些声音与我们目前正在做的事情类似。
$ b
*请注意,我们制作的某个特定版本中的某些修改与所有产品版本相关,而有些修改则不是这样。 解决方案 我认为单回购方法是一种更简单,更经典的方法。 We are doing development for automation code. Our code automates the company's products and is synced to a particular product version. Currently, we have 1 big Git repository with multiple branches in it - v1.0, v1.1, v2.0 (automation for version 1.0 goes in v1.0 branch, and so on). What are the advantages and disadvantages of having these in a single repository with branches vs. keeping each version code in a separate repository ? Both solutions can work, the answer i'm looking for is a list of pros/cons for either approach. I know that many teams are using branches to isolate temporary stages in development, such as doing a bug fixes or a new feature, merging back the work into the main development branch in the end. Other modes of work i know are having different branches for development, release, etc, to separate "cleaner" revisions of the code from dirty ones that are constantly being worked on. None of these sound similar to what we are currently doing though. *Note that some modifications in a particular version we make are relevant for all product versions, while some are not. I would argue the single repo approach is a simpler and more classic approach. 这篇关于使用git分支与多个存储库的好处的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
缺点:
$ b $ h2多次回购
优点
缺点
< hr>
这就是说,如果您拥有很多版本(需要定期清理),在自己的回购中隔离这些临时版本也可以。Multiple branches
Pros:
Cons:
Multiple repos
Pros
Cons
That said, if you have many versions (which need to be cleaned up regularly), isolating those transient versions in their own repo can work too.