Skip to content

Instantly share code, notes, and snippets.

@tsmsogn
Forked from cowboy/github_post_recieve.php
Last active August 29, 2015 14:12
Show Gist options
  • Save tsmsogn/9cb6707c3135254cb50b to your computer and use it in GitHub Desktop.
Save tsmsogn/9cb6707c3135254cb50b to your computer and use it in GitHub Desktop.
<?php
// Use in the "Post-Receive URLs" section of your GitHub repo.
if ( $_POST['payload'] ) {
shell_exec( 'cd /srv/www/git-repo/ && git pull' );
}
?>hi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment