Skip to content

Instantly share code, notes, and snippets.

@tvrcgo
Last active December 15, 2015 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tvrcgo/59d2ed2b40f8a9cab116 to your computer and use it in GitHub Desktop.
Save tvrcgo/59d2ed2b40f8a9cab116 to your computer and use it in GitHub Desktop.
git hook: refresh work trees on receiving git push.
#source ~/.bash_profile
export PATH=/usr/sbin:/usr/local/bin:$(npm bin):$PATH
# refresh dir.
git --git-dir=. --work-tree=$PWD/.. reset --hard
cd ..
# build.
echo '--- build start ---'
npm run release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment