title: execute git command inside bash script
body: <p>I am writing <code>gitosis</code> post-push hook for central repository </p>
  
  <p>which pulls updates from central repository to testing enviroment</p>
  
  <p><code>nano /var/git/repositories/holding.git/hooks/post-update</code></p>
  
  <pre><code> #!/bin/bash
  
   cd /var/vh/holding;
   git reset --hard;
   git checkout testing;
   git pull;
  </code></pre>
  
  <p>here what I get after push on my client (development VM)</p>
  
  <pre><code># blah ...
  Counting objects: 57, done.
  Compressing objects: 100% (24/24), done.
  Writing objects: 100% (30/30), 3.42 KiB, done.
  Total 30 (delta 18), reused 0 (delta 0)
  fatal: Not a git repository: '.'
  fatal: Not a git repository: '.'
  fatal: Not a git repository: '.'
  fatal: Not a git repository: '.'
  To git@cheby.ru:holding.git
     233b5a2..0f46cd8  testing -&gt; testing
  </code></pre>
  
  <p>Obviously, my attempt to tell git, where it should do pull, failed.</p>
  
  <p>What is correct way to run git command for a specified working copy in bash script?</p>