From: Neal Kreitzinger <nkreitzinger@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: unlisted-recipients:; "(no To-header on input) Neal Kreitzinger"
<neal@rsss.com>,
git@vger.kernel.org
Subject: Re: post-update to stash after push to non-bare current branch
Date: Fri, 20 Jan 2012 18:35:21 -0600 [thread overview]
Message-ID: <4F1A0849.8050205@gmail.com> (raw)
In-Reply-To: <7vr4ytdi54.fsf@alter.siamese.dyndns.org>
On 1/20/2012 6:16 PM, Junio C Hamano wrote:
> Neal Kreitzinger<nkreitzinger@gmail.com> writes:
>
>> To get this to work I had to learn more about shell scripting and export
>> the GIT_WORK_TREE git environment variable.
>>
>> (post-update hook):
>> export GIT_WORK_TREE=/home/neal/FSNMSTHTML
>> git checkout -f HEAD
>
>
> Hmm, I thought "cd ..&& git checkout -f HEAD" (or "git reset --hard")
> would have worked.
Ok, I just tried that for the first time and it complained "not a git
repository: '.'" because it looks like that caused GIT_DIR to no longer
point to WORKTREE/.git but instead to WORKTREE/ because GIT_DIR is set
to '.' in the post-update script's environment as indicated in this
thread:
http://stackoverflow.com/questions/6635018/reuse-git-work-tree-in-post-receive-hook-to-rm-a-few-files
v/r,
neal
prev parent reply other threads:[~2012-01-21 0:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-18 17:53 post-update to stash after push to non-bare current branch Neal Kreitzinger
2012-01-18 18:33 ` Neal Kreitzinger
2012-01-18 18:51 ` Neal Kreitzinger
2012-01-18 22:38 ` Junio C Hamano
2012-01-19 0:32 ` Neal Kreitzinger
2012-01-19 1:00 ` Junio C Hamano
2012-01-19 21:48 ` Neal Kreitzinger
2012-01-21 0:13 ` Neal Kreitzinger
2012-01-21 0:16 ` Junio C Hamano
2012-01-21 0:35 ` Neal Kreitzinger [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=4F1A0849.8050205@gmail.com \
--to=nkreitzinger@gmail.com \
--cc=gitster@pobox.com \
/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).