Skip to content

Instantly share code, notes, and snippets.

@daryltucker
Last active December 29, 2015 20:53
Show Gist options
  • Save daryltucker/58b1bf620b82d4263f95 to your computer and use it in GitHub Desktop.
Save daryltucker/58b1bf620b82d4263f95 to your computer and use it in GitHub Desktop.
The simplest, strongest git hook
REPO="/path/to/living-repo"
BARE_REPO="/path/to/bare-repo"
cd ${REPO}
git --git-dir=${REPO}.git --work-tree=${REPO} reset --hard
git --git-dir=${REPO}.git --work-tree=${REPO} pull --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment