Re: [PATCH] Detached HEAD (experimental)

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

 



On Mon, 08 Jan 2007 16:19:28 -0800, Junio C Hamano wrote:
> 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".

So what's the final check? Is it "can come from detached HEAD to a
branch only if the detached HEAD is reachable from the target branch"?

If so, that's still a trap for people who are just exploring with "git
checkout" and never make any commits while detached.

> 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".

You would probably do this, yes, but is it what you would recommend
in a tutorial for new users doing read-only exploration of old
versions of some piece of software? One of the main reasons I'm
interested in the "detached head" stuff is so that such users can use
"git checkout" to explore any revision and never have to worry about
doing anything "wrong", (never leave any commits dangling), nor ever
have to see any "scary" message, (ie. "use checkout -f if you know
what you are doing").

-Carl

PS. Thanks for giving detached head some attention---I'm chronically
inept at getting into actual git development like I'd really like to.

Attachment: pgpUQ1wTwBEdj.pgp
Description: PGP signature


[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]