0

I was following the guide from here John Anderson Vim Setup to help setup vim. he steps through adding the various submodules to git in the format

git submodule add http://github.com/tpope/vim-fugitive.git bundle/fugitive

since completing his guide I have made further changes. Getting ahead of myself I am on ubuntu my path is ~/.vim and I used the exact {autoload,bundle} setup as described in the guide.

I want to include the changes I added in my ~/.vimrc and the ohther bundles I have installed into my github so I can clone it and go on any other PC.

Really struggling to figure out how to get the changes in git. For example in my ~/.vim/bundle/ directory it has two new folders delimitMate and colorschemes. However when I do git push it returns everything as up to date.

What am I missing?

4

2 回答 2

4

这些是子模块,我想。你需要做的是:

# To add new modules
git add .gitmodules
git commit -m "Add new bundles"
# To add changes in vimrc
git add vimrc
git commit -m "Update my vimrc"
# To upload to Github
git push origin

在另一台 PC 上,克隆/拉取 Github 存储库后,您需要:

git submodule init
git submodule update

要对子模块进行新的更改,您可以稍后:

git submodule foreach git pull origin master
# NOTE: no trailing slash!
git add bundles/fugitive
git add bundles/etc
git commit -m "Update bundles"
git push

add您可以通过以下命令减少 many s:

git ls-files -m bundles | xargs git add
于 2011-11-12T06:48:47.483 回答
1

尝试:

git submodule update
git add delimitMate colorschemes [and any other file names]
git commit -m "My changes"
git push origin master

推送用于远程存储库。提交将提交到您的本地仓库。必须先在本地提交更改,然后才能推送到远程存储库。

于 2011-11-12T06:40:03.997 回答