我刚刚做了一个 git merge <merging_branch_name>
在应用程序中解决了许多冲突。
但是当我做 git status
,我可以在消息中看到带有(新提交)的子模块列表。
看起来子模块(分支/标签)版本尚未更新。
例如:
modified: plugins/myplugin.git (new commits)
如何使用版本更新子模块(使用 <merging_branch_name>
)
我在 git bash 中是这样的
my_app (current_branch |MERGING),
所以当我做 git status
,我得到如下子模块列表
modified: plugins/plugin1.git (new commits)
modified: plugins/plugin2.git (new commits)
modified: plugins/plugin3.git (new commits)
modified: plugins/plugin4.git (new commits)
我该如何解决?
最佳答案
要将子模块内容更新为新的 SHA1,这应该足够了:
# the submodule content needs to be updated
git submodule update --init
# the parent repo needs to record the new submodule SHA1
git add plugins/myplugin
关于git - 如何更新git子模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30069130/