zoukankan      html  css  js  c++  java
  • git submodule 使用

    欢迎访问我的blog:http://blog.thinkinside.me

    最近在跟踪Linphone的Android版本的项目,发现代码同步老出问题。
    于是仔细的学习了一下git submodule的使用方法。
    参考资料
    【1】https://git.wiki.kernel.org/index.php/GitSubmoduleTutorial
    【2】https://blogs.atlassian.com/2013/03/git-submodules-workflows-tips/
    【3】http://speirs.org/blog/2009/5/11/understanding-git-submodules.html
    【4】http://www.vogella.com/articles/Git/article.html#submodules
    与svn的external的异同
     相同点:
    用来引用外部项目
     不同点:
    git submodule引用的是具体的某一次commit,而svn external则是直接链接外部的subversion repository最新的checkin
    常用操作
    增加submodule
    git submodule add
    同步submodule
    git pull --recurse
    git submodule update --recursive
    checkin submodule的内容
    1  修改submodule并checkin
    /*some modification*/
    cd submodule_dir
    git add .
    git commit -m "check in in submodule"
    2  checkin修改后的submodule commit id
    cd base_dir
    git add submodule_dir
    git commit -m "check in in base_dir"
  • 相关阅读:
    JavaEE高级-JPA学习笔记
    jQueryrocket
    jQueryrocket
    jQueryrocket
    jQueryrocket
    jQueryrocket
    jQueryrocket
    jQueryrocket
    jQueryrocket
    jQueryrocket
  • 原文地址:https://www.cnblogs.com/goodloop/p/3153898.html
Copyright © 2011-2022 走看看