title: How can I run git commands via shell script?
body: <p>I have my main repo on my server and two clones. </p>
  
  <p>One clone is on my local for editing. Another copy is on my server in the public folder to pull the changes and view them live. </p>
  
  <p>The current routine I'm going through is edit local -> log into my server to the public folder  and do a git pull to see the updated changes. </p>
  
  <p>I would like to use the git hooks "post-receive" shell script to change into the public folder and do a git pull origin master...I just can't seem to figure out how to do this properly. I tried this using:</p>
  
  <pre><code>cd /home/demo/public_html/example.com/public/ &amp;&amp; `git status`
  </code></pre>
  
  <p>But the return I get is "not a repository"</p>
  
  <p>However, if I run <code>cd /home/demo/public_html/example.com/public/ &amp;&amp; ls</code></p>
  
  <p>I WILL get the contents of the public folder (so I'm moving into the right place) Thanks in advanced!</p>
  
  <p>UPDATE:</p>
  
  <p>Should have mentioned I was trying this with and without ticks</p>