- 如果项目中包含子模块,想将子模块代码一同拉取下来
git clone --recursive https://github.com/xxx.git
- 如果未使用 --recursive,已经将主目录拉取到本地,子模块为空文件夹
先初始化子模块配置文件,再更新子模块内容
git submodule init
git submodule update
git clone --recursive https://github.com/xxx.git
git submodule init
git submodule update