Git策略适用于具有多个独立模块的项目 [英] Git strategy for a project with many independent modules

查看:126
本文介绍了Git策略适用于具有多个独立模块的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在研究一个由十几个不同模块组成的项目。每个模块本身就是一个小应用程序(其中一些应用程序是Rails应用程序,一些是守护程序服务等)。

我们在两个选项之间犹豫不决:



1个/每个模块一个文件夹一个git回购
$ b $ 2个/每个模块一个git回购



哪种方法最好?解决方案

每个模块一个回购通常是最好的,特别是如果他们可以进化并独立标签。

这类似于基于组件的方法,类似于我在 Component based web project directory layout with git and symlinks



但如果你如果不修改另一个组件(或其他组件),就不能修改其中一个,那么只有这样,一个回购才有意义。

这将被称为

We are working on a project composed of about a dozen different modules. Each module is a small application per se (some of them are Rails apps, some are daemon services, etc.)

We are hesitating between 2 options:

1/ One git repo with one folder per module

2/ Several git repos (one per module)

Which approach is the best ?

解决方案

One repo per module is usually best, especially if they can evolve and being tagged independently one from another.
This is akin to a
component-based approach, and similar to what I proposed in "Component based web project directory layout with git and symlinks".

But if you cannot make any change in one without having to modify another component (or several others), then and only then, one repo would make sense.
That would be called the "system approach" in a "Component-driven development".
The other argument for one repo would be if all those components have only a few files in them (and not tens or hundreds of files).

这篇关于Git策略适用于具有多个独立模块的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆