我有git repo:https://github.com/bbialek/dotfiles 我想为vim的病原体插件创建子模块。
cd ~/dotfiles/vim
git submodule add https://github.com/tpope/vim-pathogen .vim
它说:
' VIM /的.vim'已存在于索引
中
是不是因为我已经有了子模块 ../dotfiles/vim/.vim/bundles/*?
我的.gitmodules
:
[submodule "vim/.vim/bundle/nerdtree"]
path = vim/.vim/bundle/nerdtree
url = https://github.com/scrooloose/nerdtree
[submodule "vim/.vim/bundle/vim-autoformat"]
path = vim/.vim/bundle/vim-autoformat
url = https://github.com/Chiel92/vim-autoformat
[submodule "vim/.vim/bundle/vim-colors-solarized"]
path = vim/.vim/bundle/vim-colors-solarized
url = https://github.com/altercation/vim-colors-solarized
[submodule "vim/.vim/bundle/vim-sensible"]
path = vim/.vim/bundle/vim-sensible
url = https://github.com/tpope/vim-sensible
[submodule "vim/.vim/bundle/YouCompleteMe"]
path = vim/.vim/bundle/YouCompleteMe
url = https://github.com/Valloric/YouCompleteMe
[submodule "tmux/.tmux/plugins/tpm"]
path = tmux/.tmux/plugins/tpm
url = https://github.com/tmux-plugins/tpm
答案 0 :(得分:1)
您无法在声明的子模块路径中注册子模块(如vim/.vim/bundle/nerdtree
)
由于您已经有多个子模块使用.vim
,因此您需要为.vim
子模块存储库使用不同的文件夹。