使用Git Submodule管理子模块 - daaoling/daaoling.github.io GitHub Wiki
Tags:Git
https://segmentfault.com/a/1190000003076028
git submodule add https://github.com/cloudwu/pbc third_libs/pbc
$ git status
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: .gitmodules
new file: third_libs/pbc
cd third_libs/pbc
git pull origin master
step:
remove from .git/config
$ git submodule deinit third_libs/pbc
Submodule 'third_libs/pbc' (https://github.com/cloudwu/pbc) unregistered for path 'third_libs/pbc'
remove from .gitmodules
git rm $submodule path
$ git rm -f third_libs/pbc
rm 'third_libs/pbc'
rm -rf $submodulepath rm -rf .git/modules/$submodulepath