How to create Git submodules in GitHub and GitLab by example
git submodule 添加 更新 删除 教程
5步删除git submodule
git push --recurse-submodules=on-demand
我把github上面一个项目改了几处,然后存自己服务器上了,后来在别的电脑上pull这个项目的时候产生了以下报错,submodules拉不下来。
Why does git submodule update fail with “fatal: remote error: upload-pack: not our ref”?
以下步骤解决:
cd {submodule path}
git reset --hard origin/master
cd -
git clean -n
git add {submodule path}
git commit
git submodule update --init --recursive