保持git子模块历史记录与包含repo历史记录分开

时间:2016-03-04 16:29:18

标签: git git-submodules

如果我有一个带有名为Producer的git子模块repo的git项目Consumer,有没有办法让子模块(Producer)的提交历史与包含的git repo(Consumer)分开?

1 个答案:

答案 0 :(得分:1)

根据定义,子模块允许您将其与父存储库分开。

Consumer会向制作人录制 gitlink special entry in its index),即已修复 SHA1。

即使您instruct that submodule to "follow" a branchConsumer的结帐会立即更新Producer(需要单独的git submodule update --remote

子模块允许仓库在子模块仓库历史记录中的固定点引用另一个仓库(参见" true nature of submodules")

相关问题