bbPi bbPi - 1 year ago 180
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 =

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download