我有一个主git存储库A,我们在主项目的子目录中使用另一个git存储库B中的源代码.现在最好在这个使用过的子目录中的A存储库中检出B存储库.如果其他人然后克隆了存储库,他当然应该获得我们的主存储库A并在其中自动获取B存储库.
让我可视化目录结构:
+ main_repository - the root directory of the main Repository
+ src - directory containing the source
+ foreignRepo - this should be the root directory of another git repo
+ binaries
+ other
这必须在远程存储库中也是已知的,只是本地副本对我没有帮助,因为其他人检查这一点并且必须能够编译所有的东西.