Skip to content

Instantly share code, notes, and snippets.

@dreamalligator
Created April 28, 2014 19:54
Show Gist options
  • Save dreamalligator/11382316 to your computer and use it in GitHub Desktop.
Save dreamalligator/11382316 to your computer and use it in GitHub Desktop.
My current Git hooks.
#!/bin/sh
WEB_DIR=~/digitalvapor
# 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
# if need to exclude some files from being cleaned
# git --work-tree=${WEB_DIR} clean -fd --exclude=<pattern>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment