GitHub include from another repository

I'm new to github.

I have a github repo on my machine. I want to include another repo (as a third party) into my repo. I believe I should make a fork first. But how do I include it on my local repo?

I've tried submodules but with no success...

Thanks.


git submodule remains the recommended way: you can declare ( git submodule add ) a repo which doesn't belong to you, or a fork (which, by definition, belongs to you).

Don't forget though, that:

  • you still need to git submodule update --init in order to see that submodule repo being displayed with its full content in your repo
  • add and commit the special entry representing the root directory of that submodule in your main (parent) repo, and push that commit, in order to validate that declaration.
  • 链接地址: http://www.djcxy.com/p/92272.html

    上一篇: 如何公开使用子模块,但本地符号链接到单个克隆?

    下一篇: GitHub包含另一个存储库