当我键入 git submodule update --init --recursive
以递归克隆子模块时,它开始说 cloning...
然后什么都不做...只是挂起。
一个明显的解决方法是从 .gitmodule 文件获取路径和 repos,导航到它们指定的路径,然后手动 git clone
它们。
另一个明显的修复是 Cntr-Z 来中断操作,删除由 --init 子句生成的 .git
文件,然后重试。它似乎有效。
不过,我的结果似乎很糟糕。
我的主要问题是:如何在不挂起的情况下获取 git submodule update --init --recursive
工作属性?
其他人以前遇到过这个吗?
最佳答案
默认情况下,更新子模块不显示进度。而且由于许多 Git 存储库的下载速度相对较慢,这可能会导致出现挂起(这在我身上发生过多次)。
要确保这不仅仅是下载速度大、速度慢的情况,请使用 --progress
选项运行更新命令。
git submodule update --init --recursive --progress
关于git submodule update --init --recursive 挂起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45823070/