Re: [PATCH 1/2] Documentation/git-checkout.txt: clarify usage
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Dec 17, 2012, 08:20 UTC
- Message-ID
- <50CED5D4.5040705@viscovery.net>
- In-Reply-To
- <7vhanlnnz7.fsf@alter.siamese.dyndns.org>
Am 12/17/2012 8:21, schrieb Junio C Hamano:
> Chris Rorvick <chris@rorvick.com> writes: >> 'git checkout' [<branch>]::
Is <branch> really optional in this form?
BTW, what does plain 'git checkout' do? Just report ahead/behind information?
>> + >> + Update the index, working tree, and HEAD to reflect the >> + specified branch.
...
>> +'git checkout' [--detach] [<commit>]::
The title here is better spelled as two lines:
'git checkout' <commit>:: 'git checkout' --detach <branch>::
I don't think that <commit> or <branch> should be indicated as optional here.
Show 8 quoted lines
>> + >> + Update the index and working tree to reflect the specified >> + commit and set HEAD to point directly to <commit> (see >> + "DETACHED HEAD" section.) Passing `--detach` forces this >> + behavior even if <commit> is a branch. > > Prepare to work on building new history on top of <commit>, > by detaching HEAD at the commit and ...(likewise)...
-- Hannes