Last Updated: February 25, 2016
·
1.835K
· garrett_oreilly

Keep Pathogen bundles up to date with git

If your .vim directory is a git repo, you can keep Pathogen bundles up to date by installing plugins as submodules:

git submodule add <URL-to-plugin> bundle/<name-of-plugin>

To update all of your plugins at once, run this single command:

git submodule foreach git pull

Bonus: If you want to install Pathogen as a submodule like your other plugins, simply prepend this to your .vimrc:

runtime bundle/vim-pathogen/autoload/pathogen.vim

Second bonus: If you want to set up shop on another computer:

cd ~
git clone <URL-to-your-.vim-repo-on-github>
cd .vim
git submodule init
git submodule update
git submodule foreach git checkout master

1 Response
Add your response

I do not have the whole .vim dir under git control therefore I usually do:

cd ~/.vim/bundle
for i in `ls`; do
  cd "$i"
  git pull
  cd ..
done
over 1 year ago ·