Fork a Github repo into another repo as part of a larger project

前端 未结 1 1599
温柔的废话
温柔的废话 2020-12-18 04:16

Perhaps I\'m missing something here, but I\'ve looked and I want to do something that looks pretty simple, but I\'ve yet to figure out (or find someone who has) how to accom

1条回答
  •  北海茫月
    2020-12-18 04:35

    Submodules are indeed a good fit, as your repo will only record a gitlink (special entry mode 160000) to record the commit of the submodule repo you are using.

    Don't forget that this submodule is a git repo of its own, which means:

    • you can make commits in it (see "true nature of submodules")
    • you can make it follow the latest commits of branch (see "git submodule update")
    • you can add remotes to it (like a remote to the original repo you have forked, in order to fetch updates from said original repo, see "What is the difference between origin and upstream in github")

    0 讨论(0)
提交回复
热议问题