Skip to content

Instantly share code, notes, and snippets.

@patriciogonzalezvivo
Last active August 29, 2015 14:03
Show Gist options
  • Save patriciogonzalezvivo/f64cc1e58d0a3e1d0b54 to your computer and use it in GitHub Desktop.
Save patriciogonzalezvivo/f64cc1e58d0a3e1d0b54 to your computer and use it in GitHub Desktop.
Highly insecure way to auto update a repo in a website using WebHooks
<?php
{
    $output = shell_exec("cd /var/www/html/; git pull origin master;");
    echo "<pre>$output</pre>";
}
die("done " . mktime());
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment