向仓库添加子模块,使用 git submodule add https://github.com/user/submodule-repo.git,这是指定子模块仓库 URL 的典型格式。这会为子模块创建一个新文件夹,并在指定版本上检出。要更新现有子模块到最新提交,运行 git submodule update。如果你想在保留子模块历史记录的同时拉取上游的变更,使用 git submodule sync 后跟 git submodule update。
用自己的话写下这一站的结论。