So I got a GIT repository with a couple of submodules. Now i created a "post-update" hook on my webserver that automatically deploys my website on update.
That's how my post-update hook looks like:
#!/bin/sh rm -rf /home/my_user/public_html/my_website/* unset GIT_INDEX_FILE export GIT_WORK_TREE=/home/my_user/public_html/my_website/ export GIT_DIR=/home/my_user/gitrepos/my_website.git git checkout -f
Everything works nicely apart from the fact that the submodules directories are not exported... And that is my question. How can I deploy a GIT repository and it's submodules through the post-update hook?
Thanks in advance!