将git子模块添加到存储库的根目录中? [英] Adding git submodule into the root of the repository?

查看:142
本文介绍了将git子模块添加到存储库的根目录中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过在

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆