How to set up a git project to use an external repo submodule?

前端 未结 4 1513
清歌不尽
清歌不尽 2020-11-27 08:50

I\'d like to create a repo which pulls in a remote repo.

For example, let\'s say jQuery as a submodule:

git://github.com/jquery/jquery.git

4条回答
  •  渐次进展
    2020-11-27 09:27

    I think that the @Hugo answer could be what you need and works fine. So I have found a easier way.

    git submodule update --remote
    

    That's all.

    So a complete workflow could be:

    git clone project-with-submodules
    git submodule init
    git config -l
    git submodule update --remote
    

提交回复
热议问题