Re: [PATCH] git-checkout.txt: improve detached HEAD documentation
- From
Nicolas Pitre <nico@fluxnic.net>
- Date
- Feb 18, 2011, 00:14 UTC
- Message-ID
- <alpine.LFD.2.00.1102171909412.14920@xanadu.home>
- In-Reply-To
- <7v7hcy9vrk.fsf@alter.siamese.dyndns.org>
On Thu, 17 Feb 2011, Junio C Hamano wrote:
Show 26 quoted lines
> Jay Soffian <jaysoffian@gmail.com> 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: > > I think it is a regression from the original text to omit mention of tags > and replace the first example of the section with a more advanced use case > of jumping to the middle of a branch; it is far more likely that a user > would want to detach at a specific release point. > > You can rectify it by tagging 'c' as a release point and detaching the > HEAD at that tag without losing the clarity of the following description. > While doing so, it would be better to update the labels in the > illustration with s/master/master branch/ and s/[abcde]/commit &/ as well, > e.g. > > > HEAD (refers to branch 'master') > | > V > a---b---c---d branch 'master' (refers to commit 'd') > ^ > | > tag 'v2.0' (refers to commit 'c')
While I agree with the above, I think this is still a good idea to keep this example using a non-tagged commit as well. Perhaps not the first one as you say.
Nicolas