Easy way to pull latest of all git submodules

前端 未结 19 2074
谎友^
谎友^ 2020-11-22 05:20

We\'re using git submodules to manage a couple of large projects that have dependencies on many other libraries we\'ve developed. Each library is a separate repo brought int

19条回答
  •  时光取名叫无心
    2020-11-22 05:55

    First time

    Clone and Init Submodule

    git clone git@github.com:speedovation/kiwi-resources.git resources
    git submodule init
    

    Rest

    During development just pull and update submodule

    git pull --recurse-submodules  && git submodule update --recursive
    

    Update Git submodule to latest commit on origin

    git submodule foreach git pull origin master
    

    Preferred way should be below

    git submodule update --remote --merge
    

    note: last two commands have same behaviour

提交回复
热议问题