-
-
Save meatcar/4261385 to your computer and use it in GitHub Desktop.
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 | |
cd .. | |
GIT_DIR='.git' | |
umask 002 && git reset --hard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Stick this into
.git/hooks/post-receive
. Now, when you push to a remote repo that has this hook, your code will be automatically pulled in. This is helpful with deploying via git.Note: This doesn't switch branches, so make sure you push to the correct branch.