git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [SOLVED] `git fetch tag NAME' into mirror repo does not update HEAD, what to do?

From
BFBrian Foster <brian.foster@innova-card.com>
Date
Aug 13, 2010, 07:03 UTC
Message-ID
<201008130903.56375.brian.foster@innova-card.com>
In-Reply-To
<4C63F860.2090600@dbservice.com>
On Thursday 12 August 2010 15:34:24 Tomas Carnecky wrote:
Show 9 quoted lines
> On 8/12/10 3:22 PM, Brian Foster wrote:
> > On Thursday 12 August 2010 14:32:41 Tomas Carnecky wrote:
> >>                                                         When you use
> >> 'git update-ref --no-deref HEAD v2' it will modify HEAD
> > 
> >  NO, it gets an error [ ... ]
> 
> Oh the subtleties when working with plumbing:
>    git update-ref --no-deref HEAD v2^{commit}
 Yes, that updates HEAD, leaving SLAVE in the odd state
 of HEAD being v2 and master's head being v1 (which I
 presume is another example of detached head?).
Show 11 quoted lines
> >[ ... ]
> >  I do_not_ want a detached head!  This has perhaps been
> >  confused by my improperly saying “update HEAD” when I
> >  meant “update the master branch”.  [ ... ]
> >                                 Having HEAD continue to
> >  be a symref to refs/heads/master (which, in this case,
> >  is the same commit as v2) is correct.
> 
> Just make sure your tools and scripts don't break when you reset the
> branch like that (especially when the update is non-fast forward as
> fetch+reset won't warn you when this happens).
 Understood.  And I'm not too worried about that happening,
 albeit the current procedures are perhaps not as robust as
 they could or should be.  Again, thanks for the suggestions
 and help.
cheers!
	-blf-
Previous: Tomas CarneckyNext: Brandon Casey
Message 9 of 11 in “[Q] `git fetch tag NAME' into mirror repo does not update HEAD, what to do?”
  1. Brian FosterAug 12, 2010
  2. Tomas CarneckyAug 12, 2010
  3. Brian FosterAug 12, 2010
  4. Tomas CarneckyAug 12, 2010
  5. [SOLVED] `git fetch tag NAME' into mirror repo does not update HEAD, what to do?Brian Foster, Aug 12, 2010
  6. Tomas CarneckyAug 12, 2010
  7. Brian FosterAug 12, 2010
  8. Tomas CarneckyAug 12, 2010
  9. Brian FosterAug 13, 2010
  10. Brandon CaseyAug 12, 2010
  11. Brian FosterAug 13, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.