github linking with other repos

我与影子孤独终老i 提交于 2019-11-28 04:28:06

You can use git submodules to "link" to other projects. See here - http://help.github.com/submodules/

gabra

There is an alternative to submodules that I found out to be more practical: subtree.

According to this link the advantages are:

  • Management of a simple workflow is easy.
  • Older version of git are supported (even before v1.5.2).
  • The sub-project’s code is available right after the clone of the super project is done.
  • subtree does not require users of your repository to learn anything new, they can ignore the fact that you are using subtree to manage dependencies.
  • subtree does not add new metadata files like submodules doe (i.e. .gitmodule).
  • Contents of the module can be modified without having a separate repository copy of the dependency somewhere else.

GitHub will also allow you to reference another repository in a comment on GitHub or in a commit. For example:

We should probably handle this with github/enterprise#59

This will add an update to the issue github/enterprise#59 with a link to your comment/commit.

Cross-Repository Issue References

Sure, GitHub's all about social coding, but you can have social repositories, too. You can reference issues between repositories by mentioning user/repository#number in an issue. Once we see something like that — say, github/enterprise#59 — we'll make sure to update issue #59 in github's enterprise repository and let you know where it was referenced from. This is a part of GitHub Flavored Markdown, which also has a few tricks of its own.

Read more: https://github.com/blog/967-github-secrets

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!