创建命令:
---建立
父
git init .
git remote add origin https://gitee.com/xxx/develope.git
git checkout -b swtjAppV3
子
mkdir appv3
cd appv3
git submodule add -b ocxAvstream https://gitee.com/xxx/ocxs.git ocxAvstream
git submodule add -b ocxOsg https://gitee.com/xxx/ocxs.git ocxOsg
git submodule add -b ocxUi https://gitee.com/xxx/ocxs.git ocxUi
git submodule add -b ocxMysql https://gitee.com/xxx/ocxs.git ocxMysql
git submodule add -b dev https://gitee.com/xxx/appv3.git appv3
//保存
git add .
git commit -m'swtjAppv3子模块配置'
git push origin swtjAppV3
命令说明:1.通过命令 将develope仓库建立到本地,在本地新建分支
2.通过命令 submodeule 添加子模块,并指定ocxs仓库的分支
3.通过 push 将子模块信息保存到develope仓库
应用命令:
---应用
git init .
git remote add origin https://gitee.com/develope.git
git pull origin swtjAppV3
//--拉取子模块
git submodule sync --recursive
git submodule update --init --recursive
命令说明:1.通过命令 将develope仓库建立到本地,在本地新建分支
2.通过命令submodule 拉取子模块