Reputation: 49104
I'm a git newbie. My git repo includes submodule references. I have a post-receive hook to checkout the repo contents to my web directory:
#!/bin/sh
GIT_WORK_TREE=/home/www/hello_world_php git checkout -f
(Per this blog post.)
It works fine except that the submodule directories in the www directory are NOT populated.
How to fix?
Upvotes: 5
Views: 2458
Reputation: 1324258
For a cloned repo, what I do when I see I don't have anything in .git/modules/xxx
, is:
git submodule update --init --recursive
If you don't, all you have is an empty directory representing your submodule root, and stored in your working tree as a special entry (mode 160000).
Upvotes: 8