九库查询/Git 命令速查/git submodule add
git submodule add
添加子模块
- 分组
- 子模块
- 命令
- git submodule add
- 示例
- git submodule add https://example.com/lib.git vendor/lib
会在 .gitmodules 登记并把子模块固定在某个提交上。子模块更新后主仓库要另外提交一次指针变更。
数据来源:Git 官方文档整理。内容存于数据库,更新日期 2026 年 11 月 16 日。
九库查询/Git 命令速查/git submodule add
添加子模块
会在 .gitmodules 登记并把子模块固定在某个提交上。子模块更新后主仓库要另外提交一次指针变更。
数据来源:Git 官方文档整理。内容存于数据库,更新日期 2026 年 11 月 16 日。