From: Johan Herland <johan@herland.net>
To: Mahesh Vaidya <forvaidya@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Git Fetch / updating HEAD
Date: Sat, 17 Jul 2010 18:11:13 +0200 [thread overview]
Message-ID: <201007171811.13624.johan@herland.net> (raw)
In-Reply-To: <AANLkTilp5lZn99QZPWSkCHStnRdkGx6mMU2IQBvllaU4@mail.gmail.com>
On Saturday 17 July 2010, Mahesh Vaidya wrote:
> BTW - I have tried this
> git update-ref HEAD FETCH_HEAD; is this ok ??
>
> On Sat, Jul 17, 2010 at 9:02 PM, Mahesh Vaidya <forvaidya@gmail.com>
wrote:
> > Hi,
> >
> > git fetch --all --append updates FETCH_HEAD. I'd like this command to
> > update HEAD as well; is there any flag ?
> >
> > I have a reason to do it; trying to implement multisite
> >
> > A (master) -> B (readonly mirror) -> C (workspace)
> >
> > if sitting in B; git fetch does't update HEAD
You need to set up special refspecs in your B repo, so that git fetch
updates refs/heads/* instead of refs/remotes/origin/*. When that is done, a
simple 'git fetch' will update your branches (and HEAD as a result).
In short, you should create the B repo using 'git clone --mirror' (which
will set up the correct refspecs for you)
...Johan
--
Johan Herland, <johan@herland.net>
www.herland.net
prev parent reply other threads:[~2010-07-17 16:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-17 15:32 Git Fetch / updating HEAD Mahesh Vaidya
2010-07-17 15:35 ` Mahesh Vaidya
2010-07-17 16:11 ` Johan Herland [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=201007171811.13624.johan@herland.net \
--to=johan@herland.net \
--cc=forvaidya@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).