- 如果首次克隆倉庫及其模塊,使用:
git clone --recursive 倉庫地址
- 對於倉庫首次拉取模塊,可以使用:
git submodule update --init --recursive
- 更新子模塊(適用於
git 1.8.2
及以上版本)
git submodule update --recursive --remote
- 更新子模塊(適用於
git 1.7.3
及以上版本)
git submodule update --recursive
或者
git pull --recurse-submodules