bbPi bbPi - 1 month ago 4
Git Question

git submodule already exist but it doesn't?

I have git repo:
I want to create submodule for vim's pathogen plugin.

cd ~/dotfiles/vim
git submodule add .vim

It says:

'vim/.vim' already exists in the index

Is it because I already have submodules in
../dotfiles/vim/.vim/bundles/* ?


[submodule "vim/.vim/bundle/nerdtree"]
path = vim/.vim/bundle/nerdtree
url =
[submodule "vim/.vim/bundle/vim-autoformat"]
path = vim/.vim/bundle/vim-autoformat
url =
[submodule "vim/.vim/bundle/vim-colors-solarized"]
path = vim/.vim/bundle/vim-colors-solarized
url =
[submodule "vim/.vim/bundle/vim-sensible"]
path = vim/.vim/bundle/vim-sensible
url =
[submodule "vim/.vim/bundle/YouCompleteMe"]
path = vim/.vim/bundle/YouCompleteMe
url =
[submodule "tmux/.tmux/plugins/tpm"]
path = tmux/.tmux/plugins/tpm
url =


You cannot register a submodule within a declared submodule path (like vim/.vim/bundle/nerdtree)

Since you have multiple submodules already using .vim, you would need to use a different folder for your .vim submodule repo.