Alex B
Alex B

Reputation: 84922

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.

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

Upvotes: 9

Views: 12544

Answers (2)

tlvince
tlvince

Reputation: 516

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.

Upvotes: 20

Artusamak
Artusamak

Reputation: 2510

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.

Upvotes: 10

Related Questions