请教一个问题,a项目中有一个submodle:b,submodle:b更新后,在a项目中执行
git fetch origin
git submodule update
可是a项目中的submodle:b并未更新,求解?
漂亮男人2017-05-02 09:20:13
This is the deployment script currently used in our project, FYI
git submodule init
git submodule update
git submodule foreach 'git pull'
PHP中文网2017-05-02 09:20:13
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