I have a git repo with a submodule.
I would use in post-receive hook file:
git --git-dir="$GIT_DIR" --work-tree="$GIT_WORKDIR1" submodule update --init --recursive
but I get the following error:
remote: fatal: /usr/libexec/git-core/git-submodule cannot be used without a working tree.
I did not get solution for this problem.
What should I do to make it work?