为什么我用子模块克隆 git 项目时没有子模块目录?

Why there's no submodule directories when I clone git project with submodule?

documentation 中所述:

When you receive such a project, you get the directories that contain submodules, but none of the files yet

我用 --recursive 标志和 git 子模块初始化克隆它 (?)

$ git clone --recursive git://path/to/repo.git
$ git submodule init
$ git submodule update

但我什至没有得到目录。 .git模块文件在那里。

.git模块内容:

[submodule "Alamofire"]
path = Alamofire
url = https://github.com/Alamofire/Alamofire.git

我使用git版本2.11.0

好吧,这是愚蠢的事情。我的同事似乎忘记将子模块目录添加到 git 中。该目录应添加到 git.

Although DbConnector is a subdirectory in your working directory, Git sees it as a submodule and doesn’t track its contents when you’re not in that directory. Instead, Git sees it as a particular commit from that repository.

Documentation