Re: [PATCH] git-checkout.txt: improve detached HEAD documentation

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] git-checkout.txt: improve detached HEAD documentation

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:50:37

Jay Soffian [off-list ref] writes:
+It is sometimes useful to be able to checkout a commit that is not at
+the tip of any named branch, or even to create a new commit that is not
+referenced by a named branch. Let's look at what happens when we
+checkout commit 'b' (here we show three ways this may be done):
 
+------------
+$ git checkout v2.0  # or
+$ git checkout b     # or
+$ git checkout master^^
I'd drop the second one, as "b" is not something the end user would type
from the command line (you could say "b's commit ID" but the string 'b' is
not it, unless it is a tag or something, in which case the first one that
uses 'v2.0' already illustrates it), and adjust "three" accordingly.

Other than that, I think this version is a vast improvement over what we
have.

Thanks.

Re: [PATCH] git-checkout.txt: improve detached HEAD documentation

From: Jay Soffian <hidden>
Date: 2016-06-15 22:50:37

On Tue, Feb 22, 2011 at 12:56 AM, Junio C Hamano [off-list ref] wrote:
Jay Soffian [off-list ref] writes:
quoted
+It is sometimes useful to be able to checkout a commit that is not at
+the tip of any named branch, or even to create a new commit that is not
+referenced by a named branch. Let's look at what happens when we
+checkout commit 'b' (here we show three ways this may be done):

+------------
+$ git checkout v2.0  # or
+$ git checkout b     # or
+$ git checkout master^^
I'd drop the second one, as "b" is not something the end user would type
from the command line (you could say "b's commit ID" but the string 'b' is
not it, unless it is a tag or something, in which case the first one that
uses 'v2.0' already illustrates it)
Ah, in my mind, b _is_ the commit-ID. In your mind, b is the commit.
Fair enough, drop it.
and adjust "three" accordingly. Other than that, I think this version is
a vast improvement over what we have.
Would you mind amending what you've got so I don't have to resend?

Thanks,

j.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help