How to “git clone” including submodules?

后端 未结 15 798
夕颜
夕颜 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 06:10

    I had the same problem for a GitHub repository. My account was missing SSH Key. The process is

    1. Generate SSH Key
    2. Adding a new SSH key to your GitHub account

    Then, you can clone the repository with submodules (git clone --recursive YOUR-GIT-REPO-URL)

    or

    Run git submodule init and git submodule update to fetch submodules in already cloned repository.

提交回复
热议问题