子模块内部的Git子模块(嵌套子模块) [英] Git submodule inside of a submodule (nested submodules)

查看:251
本文介绍了子模块内部的Git子模块(嵌套子模块)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

git子模块可能由其他几个git子模块组成,而超级git repo可以为每个子模块获取内容?

我试过了使用显而易见的/幼稚的方法创建一个持有多个子模块的git仓库。

然后将这个仓库仓库添加到另一个git仓库中作为子仓库。



然后尝试通过 git submodule init 然后 git从超级git仓库的根目录子模块更新。但是,这无法获取子子模块。

正如在 解决方案

/ questions / 4251940 / retrospectively-add-recursive-to-a-git-repo / 4261001>回顾性地添加 - 递归到git repo

  git submodule update --init --recursive 

应该可以工作。

Is it possible for a git submodule to be made of several other git submodules, and the super git repo to fetch the contents for each submodule?

I have tried to do this using the obvious/naive approach of creating a git repo holding several submodules.

Then adding this git repo to another git repo as a submodule.

Then attempting to pull from the root directory of the super git repo by git submodule init and then git submodule update. But this fails to fetch the sub-submodules.

解决方案

As mentioned in Retrospectively add --recursive to a git repo

git submodule update --init --recursive

should work.

这篇关于子模块内部的Git子模块(嵌套子模块)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆