请问如何更新git项目中的submodle
黄舟
黄舟 2017-05-02 09:18:13
0
3
591

请教一个问题,a项目中有一个submodle:b,submodle:b更新后,在a项目中执行

git fetch origin
git submodule update

可是a项目中的submodle:b并未更新,求解?

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(3)
漂亮男人

This is the deployment script currently used in our project, FYI
git submodule init
git submodule update
git submodule foreach 'git pull'

滿天的星座

Execute git submodule init first
Then git submodule update

Ty80

Clone project with submodule:

git clone --recursive <remote-url>

Reference

Update project with submodule:

git submodule update --remote

Reference

Modify submodule locally.
Before making any modifications, since the submodule is in the detached state, you need to enter the directory of the submodule and switch to a branch. git checkout <branch-name> If you make any changes later, just commit them in the submodule directory.
Afterwards, when updating the submodule, it can be executed in the repo directory:

git submodule update --remote --rebase
or

git submodule update --remote --merge
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template