Skip to content

Instantly share code, notes, and snippets.

@jlengstorf
Created May 16, 2014 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlengstorf/bfdb08ed457987200d51 to your computer and use it in GitHub Desktop.
Save jlengstorf/bfdb08ed457987200d51 to your computer and use it in GitHub Desktop.
An extremely basic Git deployment script.
<?php
// Removes any local changes to avoid errors with the pull
shell_exec("git reset --hard HEAD >> ../logs/deploy.log 2>&1");
// Pulls the latest changes from the develop branch
shell_exec("git pull -v origin develop >> ../logs/deploy.log 2>&1");
shell_exec("git submodule init >> ../logs/deploy.log 2>&1");
shell_exec("git submodule update >> ../logs/deploy.log 2>&1");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment