1

使用 git 管理多项目的最佳实践?

 1 month ago
source link: https://www.v2ex.com/t/1028371
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

V2EX  ›  问与答

使用 git 管理多项目的最佳实践?

  smdbh · 1 小时 49 分钟前 · 198 次点击

背景: 一份公共代码,所有项目的基础。 每个项目在公共代码的基础上,增加应用代码。 每个项目需要修改公共代码的某些地方(修改地方不确定,实现回调的成本过高,感觉直接修改更简单些) 代码无权限管理要求

我现在想到两个方法:

  1. 一个大仓库,公共代码是主分支,项目开分支。但感觉项目多了分支太多不简洁。
  2. 每个项目单独仓库,用 subtree 引入公共代码。感觉缺点是 subtree 本身需要命令行操作, GUI 没有支持。对应公共代码显示不直观(对应公共仓库哪个 tag 啥的)。

大家看到这个需求,倾向哪个方法,或是其他合理的实现?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK