Problem: trying to deploy prestashop using github on aws but the submodules have their own .git folders and cannot be added.
git submodule foreach --recursive git add -A .
The only way i could get this to work was to manually delete the .git folders from the modules/ folders and then reindex github and redeploy.
This did work. However, I if prestashop modules use github to update themselves then when you update modules in the future the module might need a complete reinstall.