With version 2.13 of Git and later, --recurse-submodules
can be used instead of --recursive
:
(在Git 2.13及更高版本中,可以使用--recurse-submodules
代替--recursive
:)
git clone --recurse-submodules -j8 git://github.com/foo/bar.git
cd bar
Editor's note: -j8
is an optional performance optimization that became available in version 2.8, and fetches up to 8 submodules at a time in parallel — see man git-clone
.
(编者注: -j8
是可选的性能优化,已在2.8版中提供,并且可以一次并行获取多达8 -j8
模块-请参阅man git-clone
。)
With version 1.9 of Git up until version 2.12 ( -j
flag only available in version 2.8+):
(从1.9版的Git升级到2.12版( -j
标志仅在2.8+版中可用):)
git clone --recursive -j8 git://github.com/foo/bar.git
cd bar
With version 1.6.5 of Git and later, you can use:
(在Git 1.6.5和更高版本中,您可以使用:)
git clone --recursive git://github.com/foo/bar.git
cd bar
For already cloned repos, or older Git versions, use:
(对于已经克隆的仓库或较旧的Git版本,请使用:)
git clone git://github.com/foo/bar.git
cd bar
git submodule update --init --recursive
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…