Thread (11 messages) flat view 11 messages, 3 authors, 2016-06-15

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

From: Brian Foster <hidden>
Date: 2016-06-15 22:49:18

On Thursday 12 August 2010 15:34:24 Tomas Carnecky wrote:
On 8/12/10 3:22 PM, Brian Foster wrote:
quoted
On Thursday 12 August 2010 14:32:41 Tomas Carnecky wrote:
quoted
                                                        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?).
quoted
[ ... ]
 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-
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help