This repository was archived by the owner on Jan 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
git
Richard.Wang edited this page Jan 10, 2016
·
4 revisions
Workflow from https://github.com/necolas/dotfiles
$ git submodule add git://example.com/remote/path/to/repo.git vim/bundle/one-submodule
$ git submodule init
$ git submodule update
$ git add vim/bundle/one-submodule
$ git commit -m "Add a new submodule: one-submodule"
$ cd vim/bundle/one-submodule
$ git checkout master
$ git pull origin master
$ cd ../../..
$ git add vim/bundle/one-submodule
$ git commit -m "Update submodule 'one-submodule' to the latest version"
$ git push origin master
When updating a local repository from the remote repository I use
$ git submodule update
to update the submodules (that have been
initialized) in their local repository. This wipes any local
changes made to the submodule.