Skip to content

Instantly share code, notes, and snippets.

@simonewebdesign
Created March 12, 2014 22:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonewebdesign/9517516 to your computer and use it in GitHub Desktop.
Save simonewebdesign/9517516 to your computer and use it in GitHub Desktop.
git hook to deploy a site via FTP (ftp-push)
#!/bin/sh
echo "Running pre-push hook..."
branch=`git rev-parse --abbrev-ref HEAD`
if [ $branch == "master" ]; then
echo "Deploying to FTP..."
git ftp push
echo "done!"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment