Last Updated: February 25, 2016
·
833
· sugarskull

Modman / Git / Capistrano

Ran into an issue using Capistrano and Modman today.

Seems like if you clone using modman, the git submodule isn't properly added to your repository, making the mapping useless when it comes to deploy using Capistrano submodule support.

This is how you resolve it if you already added the files to the working tree. (I was adding turpentine and my git root is outside of my magento root)

Remove the cached reference previously added.

git rm --cached magento/.modman/magento-turpentine

Add the submodule - This will not re-import the submodule, but it will add the reference to .gitmodules

git submodule add -f git@github.com:nexcess/magento-turpentine.git magento/.modman/magento-turpentine

In any case, to avoid this issue you can run

modman clone git@example.com:foo/mymodule.git

Then, before adding it to the working tree, run

git submodule add git@example.com:foo/mymodule.git .modman/mymodule

More info
http://stackoverflow.com/a/4162672

Issue in Modman
https://github.com/colinmollenhour/modman/issues/44