【问题标题】:How to clone git repo with many git submodules, some of which are broken/missing?如何使用许多 git 子模块克隆 git repo,其中一些已损坏/丢失?
【发布时间】:2018-11-01 08:47:45
【问题描述】:

例如,

git clone --depth 1 --recursive https://github.com/gohugoio/hugoThemes.git themes

你可以试试:

git submodule update --init

但基本上这会在第一个错误时停止。当您不拥有仓库时,您可能只想跳过损坏的或私有的仓库,但我认为 git 还没有跳过错误选项。 foreach 命令可能会解决但尚未发现。

【问题讨论】:

    标签: git git-submodules


    【解决方案1】:

    似乎无法忽略这些错误 - git submodule init ignore failed。 除非,您可以创建一些 bash 脚本,它将获取子模块列表(不确定,如果可能的话)-> 然后逐个更新它们。

    【讨论】:

    • 是的,这就是我过去看到和做过的。可能需要在 git 论坛上进行一些思考和讨论。
    猜你喜欢
    • 2013-07-14
    • 2016-09-30
    • 1970-01-01
    • 2014-10-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-06
    • 1970-01-01
    • 2014-09-03
    相关资源
    最近更新 更多