git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: david@lang.hm
To: davetron5000 <davetron5000@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: using git-push to backup repo...strange behavior
Date: Fri, 30 May 2008 06:15:48 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.1.10.0805300611230.4014@asgard.lang.hm> (raw)
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

      parent reply	other threads:[~2008-05-30 13:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-30 12:42 using git-push to backup repo...strange behavior davetron5000
2008-05-30 12:58 ` hooks/post-update does not run Teemu Likonen
2008-05-30 13:15 ` david [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.1.10.0805300611230.4014@asgard.lang.hm \
    --to=david@lang.hm \
    --cc=davetron5000@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).