logo
0
0
WeChat Login

测试 submodule

模拟为 后端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>

如果是刚 clone 主项目,需要初始化子模块

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

About

No description, topics, or website provided.
Language
Java100%