Empty Git submodule folder when repo cloned

两盒软妹~` 提交于 2020-12-27 07:28:38

问题


I have one repo hosted at https://github.com/aikiframework/json . On my local copy, I added a submodule using the command

git submodule add git@github.com:jcubic/json-rpc.git json-rpc

Then I did a commit and push, and the changes appear on GitHub (I can click on it). But when I clone the repo

git clone https://github.com/aikiframework/json.git

the submodule folder json-rpc is empty.

What am I missing here? Did I forget about something? Why is that folder empty?


回答1:


OK I found it, needed to add --recursive when cloning the repo.

So the clone command ends up as:

git clone https://github.com/aikiframework/json.git --recursive


来源:https://stackoverflow.com/questions/11358082/empty-git-submodule-folder-when-repo-cloned

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!