How to only update specific git submodules?

后端 未结 5 839
盖世英雄少女心
盖世英雄少女心 2020-12-04 19:08

So, updating all my submodules is done by running

git submodule foreach \'git pull origin master\'

How do I update a specific submo

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-04 19:24

    If you've just cloned a repo with submodules, you can clone a specific submodule with:

    git submodule update --init submoduleName

    This will clone the master of that submodule, from their you can cd into the submodule and pull whatever branches you need.

提交回复
热议问题