zoukankan      html  css  js  c++  java
  • git submodule相关操作

    $ cd 项目目录

    // 初始化

    $ git init

    $ git submodule add https://github.com/XXXX

    // 普通更新

    $ git submodule update

    // 初始化并更新

    $ git submodule update --init --recursive

    // 递归更新

    $ git submodule foreach --recursive git submodule init 

    $ git submodule foreach --recursive git submodule update 

    // 删除

    1. 删除.gitmodules中相关内容

    2. $ git add .gitmodules

    3. 删除.git/config中相关内容

    4. $ git rm --cached path_to_submodule。注意,路径不要加后面的“/”。例如:你的submodule保存在 supports/libs/websocket/ 目录。执行命令为:$ git rm --cached supports/libs/websocket 

    5. $ rm -rf .git/modules/path_to_submodule

    6. $ git commit -m "Removed submodule <name>"

    7. rm -rf path_to_submodule

  • 相关阅读:
    面向对象3
    面向对象1
    面向对象2
    javascript的dom操作部分
    网页javascript部分
    网页css样式表部分
    网页HTML部分
    特殊集合和结构体
    集合
    数组 -自动遍历数组-冒泡排序
  • 原文地址:https://www.cnblogs.com/duelsol/p/5136403.html
Copyright © 2011-2022 走看看