使用 --recursive 和 --bare 克隆 git 存储库

oni*_*ake 6 git git-submodules

为了克隆存储库及其所有子模块,我知道您可以这样做:

$ git clone --recursive <url>
Run Code Online (Sandbox Code Playgroud)

您还可以使用以下命令将存储库克隆到裸存储库:

$ git clone --bare <url>
Run Code Online (Sandbox Code Playgroud)

我想递归克隆到裸存储库,所以我尝试了以下方法:

$ git clone --bare --recursive git@github.com:boostorg/boost.git
Run Code Online (Sandbox Code Playgroud)

它仅克隆第一个存储库(没有子模块)。

如何递归克隆到裸存储库?