Skip to content

Instantly share code, notes, and snippets.

@csrui
Created March 20, 2012 20:29
Show Gist options
  • Save csrui/2140970 to your computer and use it in GitHub Desktop.
Save csrui/2140970 to your computer and use it in GitHub Desktop.
Git - Post receive hook
#!/bin/sh
cd ..
GIT_DIR='.git'
umask 002 && git reset --hard
# Set 'receive.denyCurrentBranch' configuration variable to 'ignore' or 'warn' in the remote repository to allow pushing into
# chmod +x .git/hooks/post-receive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment