【发布时间】:2013-04-26 04:57:38
【问题描述】:
我创建了一个git repo并添加了vim-plugins(由vundle安装),在我将这个repo推送到github,并将这个repo克隆到另一个服务器后,我发现vim-plugin的目录是空的,dirs vim-plugin目录下的文件全部丢失
制作方法:
$ make a new test user in Linux, then ( su - test )
$ git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle # install vundle
$ echo "
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'Lokaltog/vim-powerline'
filetype plugin indent on
" >> .vimrc
$ vim # run vim command `:BundleInstall`
$ mkdir vimgitrepo && cd vimgitrepo && git init
$ cp -a ~/.vim/bundle .
$ git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# bundle/
nothing added to commit but untracked files present (use "git add" to track)
$ git add .
$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# new file: bundle/vim-powerline
# new file: bundle/vundle
#
如您所见,只添加了 dir。
$ git commit -m'test'
$ git push -u origin master
如果你在另一个地方克隆这个 repo,只存在空目录。
这里是github page
【问题讨论】:
-
你能分享那个 github repo 的地址,以便我们自己测试吗?
-
@romainl,该仓库中只有一个空的 vim-powerline 目录...但是您可以按照上述说明进行测试。您只需要使用 vundle 安装 vim-powerline 或任何 vim-plugins。谢谢。
-
嗯,不,谢谢,我不使用 vundle。这些插件是如何到达那里的?使用
:BundleInstall还是使用$ git clone?
标签: git vim github vim-plugin