68 个 登录

九库查询/Git 命令速查/git submodule update --init --recursive

git submodule update --init --recursive

按主仓库记录的提交检出子模块

Git 命令速查 更新 2026-11-16
分组
子模块
命令
git submodule update --init --recursive
示例
git submodule update --init --recursive

切分支或 pull 之后子模块不会自动跟随,需要执行这条。加 --remote 才会跟到子模块远端最新。

数据来源:Git 官方文档整理。内容存于数据库,更新日期 2026 年 11 月 16 日。