# git 如何添加与删除一个 submodule
Issue
欢迎在 Issue 中交流与讨论: Issue 421 (opens new window)
Author
添加 submodule
$ git submodule add :git-url dep
删除 submodule
vim .gitmodules
,找到该模块位置,删掉vim .git/config
,找到该模块位置,删除rm -rf .git/module/dep
git rm --cached dep
Issue
欢迎在 Issue 中交流与讨论: Issue 421 (opens new window)
Author
添加 submodule
$ git submodule add :git-url dep
删除 submodule
vim .gitmodules
,找到该模块位置,删掉vim .git/config
,找到该模块位置,删除rm -rf .git/module/dep
git rm --cached dep