zoukankan      html  css  js  c++  java
  • Git submodule 子模块的管理和使用

    因为代码分了两个小组管理,一部分代码使用跨平台语言实现,一部分使用原生实现。

    所以使用Git submodule 来进行管理。

    1,查看/更新 子模块

    $ git submodule add ssh://git@10.10.10.xx:443/xxx-iOS ios  #添加子模块
    $ git submodule (status)#查看子模块
    $ git submodule update  #更新项目内子模块到最新版本

    $ git submodule update --remote #更新子模块为远程项目的最新版本

    $
    git submodule foreach git pull

    ##以上方式均为更新master分支
     
     
      ## 使用下面的方式,更新 libb 的 dev 分支:
    $ git config -f .gitmodules submodule.liba.branch dev
    $ git submodule update --remote

    2,删除子模块

     

    1. 删除子模块文件夹
    $ git rm --cached assets
    $ rm -rf assets
    
    1. 删除.gitmodules文件中相关子模块信息
    [submodule "assets"]
      path = assets
      url = https://github.com/maonx/vimwiki-assets.git
    
    1. 删除.git/config中的相关子模块信息
    [submodule "assets"]
      url = https://github.com/maonx/vimwiki-assets.git
    
    1. 删除.git文件夹中的相关子模块文件
    $ rm -rf .git/modules/assets

    另一说
    git rm --cached pod-library
    rm -rf pod-library
    rm .gitmodules


    OVER

    https://juejin.im/post/5aa11f486fb9a028e0140e34 

    https://www.jianshu.com/p/9000cd49822c

    https://www.jianshu.com/p/0107698498af

     
  • 相关阅读:
    二叉堆(最小堆, 最大堆)介绍与实现
    C++ 用变量定义数组
    C++ 用变量定义数组
    053185
    053184
    053183
    053182
    053181
    053180
    oracle prior
  • 原文地址:https://www.cnblogs.com/developer-qin/p/11098900.html
Copyright © 2011-2022 走看看