start | find | index | login or register | edit
2008-09-09
by earl, 5916 days ago
You have a Git repository on a remote machine and you push to this repository. The remote repository is non-bare and you want the remote working directory to always match the HEAD after the repository was pushed to. Then use the following post-receive hook (and don't forget to chmod +x it):

#!/bin/bash
if [ "$GIT_DIR" = "." ]; then
GIT_DIR=`pwd`
fi
cd .. ; (echo -n "Remote checkout: "; git reset --hard)
powered by vanilla
echo earlZstrainYat|tr ZY @.
earl.strain.at • esa3 • online for 8662 days • c'est un vanilla site