How to “git clone” including submodules?

后端 未结 15 848
夕颜
夕颜 2020-11-22 05:40

I\'m trying to put a submodule into a repo. The problem is that when I clone the parent repo, the submodule folder is entirely empty.

Is there any way to make it so

15条回答
  •  一生所求
    2020-11-22 05:59

    [Quick Answer]

    You can use this command to clone your repo with all the submodules:

    git clone --recursive YOUR-GIT-REPO-URL
    

    Or if you have already cloned the project, you can use:

    git submodule init
    git submodule update
    

提交回复
热议问题