GitHub 在 repo 目录中维护 repo
我对使用 GitHub 非常陌生。我在 html/mycms 的存储库中克隆了它(存储库是 mycms),现在我有另一个我想维护的存储库。我将它克隆在 html/mycms/system/docs 中(存储库称为文档)。
但是,当我拉动时,我只获得 html/mycms 的更新,而文档则被忽略?我认为这是因为文件夹 html/mycms 已经设置为 mycms 存储库?我不知道如何解决这个问题。
当文档存储库位于我的 mycms 存储库中时,如何提取它?我可以以某种方式同时拉动两者吗?
谢谢!
Im super new with using GitHub.. I cloned in a repo at html/mycms (repo is mycms) and now I have another repo I would like to maintain within.. I cloned it in at html/mycms/system/docs (repo is called docs).
BUT, not when I pull, I only get updates to html/mycms and the docs one is ignored? I assume this is because the folder html/mycms has already been set to the mycms repo? I don't know how to fix this issue though..
How can I pull the docs repo while it's within my mycms repo? And can I pull both at the same time somehow?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你必须使用 git 子模块来实现你想要的。文档存储库必须单独托管(在 Github 上),并将其作为子模块添加到主存储库中。这样,当您将其克隆为
git clone --recursive [email protected] :user/mainrepo
,您将获得子模块文档存储库也在。在这里查看子模块: http://progit.org/book/ch6-6.html< /a>
You have to use git submodules for what you want. The docs repo will have to be hosted separately (on Github) and you add it as a submodule to your main repo. That way, when you clone it as
git clone --recursive [email protected]:user/mainrepo
, you will get the submodule docs repo in as well.Look here to know about submodules: http://progit.org/book/ch6-6.html