更新库依赖本地库
步骤 1: 确保子项目已经是一个 Git 仓库
cd /path/to/your/local/library
git init
git remote add origin <远程仓库地址>
git fetch步骤 2: 将本地库关联为子模块
git submodule add <本地库的路径> <子模块路径>git submodule add /path/to/your/local/library third_lib/your_library步骤 3: 提交子模块引用
git add .gitmodules third_lib/your_library
git commit -m "添加本地库作为子模块"步骤 4: 确保远程仓库可用(可选)
如果需要先上传本地库到远程仓库
总结
Last updated