模拟为 后端Java项目
并引入 前端的vue 项目为 submodule
git submodule add https://cnb.cool/m_n/tom_web web
主模块这边 更新子模块 就正常的更新 提交 主模块这边 也要更新 提交本地的 cd web git submodule update --remote --merge
son有了更新
主模块这边拉取代码
git submodule update --remote --merge
cd web git pull
git clone <remote_url>
git submodule init git submodule update
git submodule update --init --recursive
git clone --recurse-submodules <remote_url>
git config -f .gitmodules submodule.web.branch main
也可以拉取时 指定分支 git submodule update --remote --remote-branch=develop