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