From: Tomas Carnecky <tom@dbservice.com>
To: Brian Foster <brian.foster@innova-card.com>
Cc: git@vger.kernel.org
Subject: Re: [Q] `git fetch tag NAME' into mirror repo does not update HEAD, what to do?
Date: Thu, 12 Aug 2010 10:33:13 +0200 [thread overview]
Message-ID: <4C63B1C9.6050801@dbservice.com> (raw)
In-Reply-To: <201008120954.27648.brian.foster@innova-card.com>
On 8/12/10 9:54 AM, Brian Foster wrote:
>
> Bare repository ORIG's master looks like this:
>
> o--o--o--o--v1--o--v2--o--o--o HEAD
>
> where v1 and v2 are (annotated) tagged commits.
>
> Repository SLAVE is a mirror clone of ORIG which
> (very deliberately!) lags behind (i.e., its HEAD
> is one of the earlier (and usually tagged) commits
> on ORIG). SLAVE's master was like this:
>
> o--o--o--o--v1 HEAD
>
> We wanted to update its HEAD to v2, so did:
>
> git fetch ORIG tag v2
>
> This gave us:
>
> o--o--o--o--v1 HEAD
> \
> o--v2
>
> It did not update SLAVE's HEAD to v2, which we wanted.
> This was worked-around by editing refs/heads/master(?)
> but we don't want to do that again (esp. since we got
> it wrong the first time (Thank you back-ups!)).
Fetch only fetches commits. It doesn't update any local refs (other than
FETCH_HEAD). If you want to switch HEAD to that new tag, use checkout.
> Whilst we want to switch to a push from ORIG to SLAVE
> model, until that happens (there are some IT issues),
> we are still fetching on SLAVE from ORIG. Hence, how
> can we avoid the above issue; that is, what should we
> have done? Searching various docs has failed to find
> any clew or answer.
Is SLAVE a bare repo? If not, please see
https://git.wiki.kernel.org/index.php/GitFaq#non-bare.
tom
next prev parent reply other threads:[~2010-08-12 8:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-12 7:54 [Q] `git fetch tag NAME' into mirror repo does not update HEAD, what to do? Brian Foster
2010-08-12 8:33 ` Tomas Carnecky [this message]
2010-08-12 10:38 ` Brian Foster
2010-08-12 11:05 ` Tomas Carnecky
2010-08-12 12:16 ` [SOLVED] " Brian Foster
2010-08-12 12:32 ` Tomas Carnecky
2010-08-12 13:22 ` Brian Foster
2010-08-12 13:34 ` Tomas Carnecky
2010-08-13 7:03 ` Brian Foster
2010-08-12 17:02 ` [Q] " Brandon Casey
2010-08-13 7:22 ` Brian Foster
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=4C63B1C9.6050801@dbservice.com \
--to=tom@dbservice.com \
--cc=brian.foster@innova-card.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.