设置submodule子模块
1. 添加 Submodule
git submodule add <子项目的Git仓库URL> <子模块路径>git submodule add https://github.com/example/other-project.git libs/other-project2. 初始化和更新 Submodule
git submodule init
git submodule updategit submodule update --init --recursive3. 在子模块中进行修改
cd libs/other-project
# 进行修改和提交
git commit -am "修改子模块"
git push4. 主项目更新子模块引用
5. 更新 Submodule(拉取更新)
6. 删除 Submodule
Last updated