Skip to content

Instantly share code, notes, and snippets.

@dilab
Created April 10, 2014 07:14
Show Gist options
  • Save dilab/10350656 to your computer and use it in GitHub Desktop.
Save dilab/10350656 to your computer and use it in GitHub Desktop.
This phing snippet will help you run "git pull" on remote server from your local dev machine
<?xml version="1.0" encoding="UTF-8" ?>
<project name="Awesome Application" default="update">
<target name="update" description="">
<property name="username" value="" />
<property name="hostname" value="" />
<property name="public_path" value="/srv/www/your-app/public_html" />
<exec outputProperty="result"
command="ssh ${username}@${hostname} 'cd ${public_path}; git pull;'" />
<echo msg="${result}" />
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment