我有一个关于删除git子模块的问题.我正在使用git组织我的配置文件和vim包,将vim包作为子模块.现在我正在尝试删除一个子模块(根据这里的说明,但我没有成功.
--git submodule deinit -f vim/bundle/snipmate-snippets
Submodule work tree 'vim/bundle/snipmate-snippets' contains a .git directory
(use 'rm -rf' if you really want to remove it including all of its history)
Run Code Online (Sandbox Code Playgroud)
所以我试试rm -rf
......
--git rm -rf vim/bundle/snipmate-snippets
error: the following submodule (or one of its nested submodules)
uses a .git directory:
vim/bundle/snipmate-snippets
(use 'rm -rf' if you really want to remove it including all of its history)
Run Code Online (Sandbox Code Playgroud)
我做错了什么?显然只是rm -rf
像git一样告诉我不够好,因为.gitmodules文件中的子模块条目将保留.谢谢.
Chr*_*lay 18
你需要rm -rf
没有git:
rm -rf vim/bundle/snipmate-snippets
Run Code Online (Sandbox Code Playgroud)
然后你可以去掉子模块:
git submodule deinit vim/bundle/snipmate-snippets
Run Code Online (Sandbox Code Playgroud)