Re: [PATCH] Detached HEAD (experimental)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 08, 2007 at 04:19:28PM -0800, Junio C Hamano wrote:

> > Hrm. So does that mean this doesn't work (without -f):
> >
> >   git checkout v1.4.0
> >   ... look around ...
> >   git checkout v1.2.0
> 
> That should work.
> 
> The first checkout, because there is no branch v1.4.0, makes the
> HEAD detached.  You are no longer on any branch at that point,
> and "git checkout v1.2.0" that follows do not trigger the check
> which is about "coming back from the detached HEAD state".

Oh, that's even worse, since the safety valve doesn't kick in when it
should. For example, with what's in next now, I can do this:

  git checkout v1.4.0
  hack hack hack
  git commit -m -a 'some changes which will never be seen again'
  git checkout v1.2.0

I thought the _point_ of the safety valve was not to lose those changes.

> But I would probably do the second v1.2.0 "checkout" with "git
> reset --hard", if what I am doing is "wandering, looking around
> to see different commits".

As Carl mentioned, I think recommending that workflow is a terrible idea
from a user interface perspective.

-Peff
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]