Git Pull with PHP


/ Published in: PHP
Save to your folder(s)

Update a Git repo with PHP


Copy this code and paste it in your HTML
  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. }

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.