git 子模块 应用

创建命令:

---建立
        父
        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 拉取子模块

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值