git 子模块已经存在但不存在?
git submodule already exist but it doesn't?
我有 git 回购:https://github.com/bbialek/dotfiles
我想为 vim 的病原体插件创建子模块。
cd ~/dotfiles/vim
git submodule add https://github.com/tpope/vim-pathogen .vim
它说:
'vim/.vim' already exists in the index
是不是因为我已经有子模块了
../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
您不能在已声明的子模块路径中注册子模块(如 vim/.vim/bundle/nerdtree
)
由于您有多个子模块已经在使用 .vim
,因此您需要为 .vim
子模块存储库使用不同的文件夹。
我有 git 回购:https://github.com/bbialek/dotfiles 我想为 vim 的病原体插件创建子模块。
cd ~/dotfiles/vim
git submodule add https://github.com/tpope/vim-pathogen .vim
它说:
'vim/.vim' already exists in the index
是不是因为我已经有子模块了 ../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
您不能在已声明的子模块路径中注册子模块(如 vim/.vim/bundle/nerdtree
)
由于您有多个子模块已经在使用 .vim
,因此您需要为 .vim
子模块存储库使用不同的文件夹。