Last active
January 19, 2016 01:36
-
-
Save Elektordi/bb931faf00e4c30462a7 to your computer and use it in GitHub Desktop.
How to update production files on push from your computer (when your servers can't reach your git server)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Copy me at .git/hooks/post-receive | |
# And remember to set this in .git/config: | |
# | |
#[receive] | |
# denyCurrentBranch = no | |
# Working directory is .git | |
cd .. | |
echo "Push OK. Updating files..." | |
GIT_DIR=".git" git reset --hard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment