如何只更新特定的git子模块? [英] How to only update specific git submodules?
问题描述
因此,更新所有子模块是通过运行
So, updating all my submodules is done by running
git submodule foreach 'git pull origin master'
如何更新位于包中的特定子模块 / syntastic
,无需更新任何其他子模块?
How do I update a specific submodule, located in say bundle/syntastic
, without updating any other submodules?
推荐答案
我最终通过搜索如何更新只有特定的子模块,这对我来说意味着更新其超级回购指向ref的子模块。
这不是问题,也不是答案,而只是标题。
I end up there by searching how to update specific submodule only, which means for me, updating a submodule to the ref pointed by its super-repo. Which is not the question nor the answer but only the title.
所以希望帮助像我这样的其他人解答问题题目:
So in a hope of helping some others like me the answer to the question title is :
git submodule update <specific path to submodule>
这会将此子模块置于超级回购中的ref状态。
which will put this submodule in the state of the ref commited in the super-repo.
这篇关于如何只更新特定的git子模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!