Adding git submodule into the root of the repository?

佐手、 提交于 2020-06-12 05:01:20

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!