From: david@lang.hm Date: Fri, 30 May 2008 13:15:48 GMT Subject: Re: using git-push to backup repo...strange behavior Message-ID: In-Reply-To: <3a6159d2-e1ff-4aa8-bfeb-806af2bc82c8@8g2000hse.googlegroups.com> On Fri, 30 May 2008, davetron5000 wrote: > 3. On the remote side, I can find no way to update the working dir > with the changes other than git reset --hard. Do I even need to do > this? I'd like to be able to for automated builds/tests someday. > 4. I made post-update executable, but it never runs (it echos a > message to a file) I just went though this. in the remote repo I make .git/hooks/post-receive executable, then edited it and made the script that it optionally calls excecutable, and uncommented it. I then added git checkout -f and ran into a problem that was answered this morning by Johan Herland so the final script is #!/bin/sh if [ "$GIT_DIR" = "." ]; then GIT_DIR=`pwd` fi /usr/share/doc/git-core/contrib/hooks/post-receive-email cd .. /usr/bin/git checkout -f David Lang