Archive for July, 2009

using git submodules for plugins

Wednesday, July 15th, 2009

# first remove your copy and paste plugin….

git rm -r vendor/plugins/xxxxxx
git commit

now you are ready to add the submodule

git submodule add git://your_git_repo/xxxxx.git vendor/plugins/xxxxx
git commit

To load the submodule, you need to

git submodule init
git submodule update

To deploy submodules using capistrano, capistrano needs to also do the submodule init and update.

# in deploy.rb
set :git_enable_submodules,1

if you want to update the version of the submodule – or the branch
cd into the plugin, git pull or git checkout branch
then cd back to the containing project and git commit