问题
I want to keep my Vim plugins up-to-date with git by using github repos as submodules with the help of pathogen. Everything is well except pathogen itself.
For example, I have a repository in ~/.vim, at pathogen's repo has autoload directory in its root: <pathogen repo>/autoload.
Is it possible to make a git submodule so that pathogen's autoload goes into ~/.vim?
~/.vim/autoload/pathogen.vim
回答1:
Clone the submodule into a subdirectory and symlink it's contents.
For pathogen, I also explicitly blacklisted itself (in the bundle directory) to prevent it from self-sourcing.
回答2:
You can't have a submodule at the root of your repository because both .git folder would conflicts.
You must create your submodule in a subfolder.
来源:https://stackoverflow.com/questions/5232829/adding-git-submodule-into-the-root-of-the-repository