将git子模块添加到存储库的根目录中? [英] Adding git submodule into the root of the repository?
问题描述
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.
例如,我在~/.vim
中有一个存储库,在病原体的存储库中,其根目录中有autoload
目录:<pathogen repo>/autoload
.
For example, I have a repository in ~/.vim
, at pathogen's repo has autoload
directory in its root: <pathogen repo>/autoload
.
是否可以制作一个git子模块,以便病原体的autoload
进入~/.vim
?
Is it possible to make a git submodule so that pathogen's autoload
goes into ~/.vim
?
~/.vim/autoload/pathogen.vim
推荐答案
将子模块克隆到一个子目录中,并符号链接其内容.
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.
这篇关于将git子模块添加到存储库的根目录中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!