【发布时间】:2017-08-14 16:23:06
【问题描述】:
git 文档并没有明确说明 git submodule update 和 git submodule sync 之间的区别是什么。我也没有在网上找到任何帮助。有人可以帮我看看这里有什么区别吗?
update
Update the registered submodules to match what the superproject expects
by cloning missing submodules and updating the working tree of the
submodules. The "updating" can be done in several ways depending on
command line options and the value of submodule.<name>.update
configuration variable.
-
sync
Synchronizes submodules' remote URL configuration setting to the value
specified in .gitmodules. It will only affect those submodules which
already have a URL entry in .git/config (that is the case when they are
initialized or freshly added). This is useful when submodule URLs
change upstream and you need to update your local repositories
accordingly.
供参考,我使用的是git客户端2.11.0版
【问题讨论】:
标签: git git-submodules