ranchodeluxemedia
4/6/2016 - 5:24 AM

post-receive

#!/bin/sh
WEB_DIR=/path/to/example.com    # Change to your site folder

# remove any untracked files and directories
git --work-tree=${WEB_DIR} clean -fd

# force checkout of the latest deploy
git --work-tree=${WEB_DIR} checkout --force