title: 'git pull' command work from terminal but not with php shell_exec() via git repository hook
body: <p>I have create a webhook in my github repository which post on the hook url on my live server to run pull command for update my repo files on the server. </p>
  
  <p>The problem is the hook file which i have created is in the /var/www/site/web/hookfile.php (the post request is going there. i am getting the body response also)</p>
  
  <p>and my repo files are in /var/www/git-repo/</p>
  
  <p>its not updating the git-repo when i push anything to my github repository.
  I run this command using terminal and its working.</p>
  
  <pre><code>cd /var/www/git-repo &amp;&amp; git pull
  </code></pre>
  
  <p>But through my php file its not working</p>
  
  <pre><code>shell_exec('cd /var/www/git-repo &amp;&amp; git pull')
  </code></pre>