我已经阅读了另一个类似的问题,但我觉得我的问题更基本:
从git pull联机帮助页:
git pull runs git fetch with the given parameters and calls git merge to merge the retrieved branch heads into the current branch.
...
--[no-]recurse-submodules[=yes|on-demand|no]
This option controls if new commits of all populated submodules should be fetched and updated, too.
Run Code Online (Sandbox Code Playgroud)
为了使没有子模块的克隆仓库保持最新,我一直只使用git pull. 从上面看来,我只需要添加--recurse-submodules即可拉取所有子模块。
但是,如果这样有什么用的git submodule update --recursive或git submodule update --remote --rebase或如此,这有点混乱给我,我很抱歉地说。
git submodule即使我这样做,我是否需要单独执行任何命令git pull --recurse-submodules?我想要的只是与克隆的 repo 保持同步。
git ×1