简体   繁体   English

分支上的Git递归克隆不起作用

[英]Git recursive clone on a branch does not work

I'm trying to clone a specific branch of a repository with several git submodules, and having no luck with actually cloning them. 我正在尝试使用几个git子模块克隆存储库的特定分支,而实际上无法克隆它们。 I'm trying: 我正在努力:

git clone --recurse-submodules --branch myBranch -j8 https://github.com/me/myrepo

But, all the submodule folders are empty, even after cloning start. 但是,即使开始克隆后,所有子模块文件夹也都为空。

Also trying git submodule update , git submodule sync ...but nothing works, and I'm out of ideas. 也尝试git submodule updategit submodule sync ...但是什么都行不通,而且我没有主意。

Make sure those submodules are there in mybranch: 确保这些子模块在mybranch中存在:

If there is no submodule entry, that would explain why they are empty. 如果没有子模块条目,那将解释为什么它们为空。
If they are, as commented, a git submodule update --init should be enough. 如评论所示,如果它们是git submodule update --init应该就足够了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM