从GitHub克隆项目后提取git子模块 [英] Pull git submodules after cloning project from GitHub

查看:171
本文介绍了从GitHub克隆项目后提取git子模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目,其中指定了子模块.在开发机器上一切正常.我已经提交了.gitmodules文件并进行了生产.但是,它不会拉出子模块.

I have a project that has specified submodules in it. Everything works well on the dev machine. I have commited .gitmodules file and pulled on the production. However it does not pulled submodules.

如果我进入子模块目录并调用git pull,则什么也没发生.

If I go into submodule directories and call git pull, nothing happens.

在新项目中提取那些子模块的正确方法是什么?

What is the proper way to pull those submodules in the new project ?

推荐答案

从存储库的根目录开始运行:

From the root of the repo just run:

git submodule update --init

这篇关于从GitHub克隆项目后提取git子模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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