git submodule list/clone/update

add submodule:

git submodule add <remote_url> <destination_folder>

list all submodules:

git submodule status --recursive

clone all submodules:
git clone --recurse-submodules https://github.com/QuasarApp/CQtDeployer.git
or
git clone https://github.com/songpeng22/linux --recurse-submodules

clone and then update submodules:
git submodule update --init --recursive
or
git submodule init
git submodule update


参考文献:
https://stackoverflow.com/questions/3796927/how-to-git-clone-including-submodules
https://stackoverflow.com/questions/12641469/list-submodules-in-a-git-repository

posted @ 2021-08-11 14:43  hkingsp  阅读(234)  评论(0编辑  收藏  举报