GitHub在repo目录中维护repo

时间:2012-01-26 19:01:05

标签: git github pull git-pull multiple-repositories

我是使用GitHub的超级新手..我在html / mycms(repo是mycms)的克隆中克隆了,现在我有另一个我想维护的回购..我在html / mycms / system /克隆了它docs(repo被称为docs)。

但是,当我拉,我只获得html / mycms的更新,而文档被忽略了?我假设这是因为文件夹html / mycms已经设置为mycms repo?我不知道如何解决这个问题..

如何在我的mycms回购中提取文档回购?我能以某种方式同时拉两个吗?

谢谢!

1 个答案:

答案 0 :(得分:1)

你必须使用git子模块来实现你想要的。文档仓库必须单独托管(在Github上),然后将其作为子模块添加到主仓库中。这样,当您将其克隆为git clone --recursive git@github.com:user/mainrepo时,您也将获得子模块docs repo。

在这里了解子模块:http://progit.org/book/ch6-6.html

相关问题