github 与其他存储库链接
我有一个项目依赖 github 中的两个存储库来运行。 当我将项目提交到 github 时,如何链接到这两个存储库? 我应该在自己的存储库中复制文件,还是链接到特定版本的其他存储库,因为我不希望它更新并导致不兼容。 我已经创建了我的 github 存储库,我应该做什么?
I have a project that relies on two repos in github to function.
When I submit my project to github how do I link to these two repos?
Should I duplicate the files in my own repo or link to the other repo at a specific revision as I don't want it to update and cause incompatibility.
I already created my github repo what should I do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用 git 子模块“链接”到其他项目。
请参阅此处 - https://github.blog/2016-02-01-使用子模块/
You can use git submodules to "link" to other projects.
See here - https://github.blog/2016-02-01-working-with-submodules/
我发现有一个更实用的子模块替代方案: 子树。
根据这个链接,优点是:
There is an alternative to submodules that I found out to be more practical: subtree.
According to this link the advantages are:
GitHub 还允许您在 GitHub 上的评论或提交中引用另一个存储库。例如:
这将添加对问题
github/enterprise#59
的更新,并包含指向您的评论/提交的链接。了解更多:https://github.com/blog/967-github-secrets
GitHub will also allow you to reference another repository in a comment on GitHub or in a commit. For example:
This will add an update to the issue
github/enterprise#59
with a link to your comment/commit.Read more: https://github.com/blog/967-github-secrets