Posted By

adampatterson on 10/18/11


Tagged

git Pull


Versions (?)

Git Pull with PHP


 / Published in: PHP
 

URL: http://www.adampatterson.ca/blog/2011/10/diy-simple-staging-server/

Update a Git repo with PHP

  1. /**
  2.  * Git Pull
  3.  *
  4.  * @author Adam Patterson
  5.  *
  6.  * Use: echo pull();
  7.  *
  8.  * Use a GitHub Post-Receive URL and automatic call this function with a URL.
  9.  */
  10.  
  11. function pull ( )
  12. {
  13. return shell_exec('git pull');
  14. }

Report this snippet  

You need to login to post a comment.