git-checkout.txt: clarify that <branch> applies when no path is given.
Otherwise, the sentence "Defaults to HEAD." can be mis-read to mean that "git checkout -- hello.c" checks-out from HEAD. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
ce8936c342
commit
39470cf961
@ -85,9 +85,13 @@ should result in deletion of the path).
|
|||||||
<new_branch>::
|
<new_branch>::
|
||||||
Name for the new branch.
|
Name for the new branch.
|
||||||
|
|
||||||
|
<tree-ish>::
|
||||||
|
Tree to checkout from (when paths are given). If not specified,
|
||||||
|
the index will be used.
|
||||||
|
|
||||||
<branch>::
|
<branch>::
|
||||||
Branch to checkout; may be any object ID that resolves to a
|
Branch to checkout (when no paths are given); may be any object
|
||||||
commit. Defaults to HEAD.
|
ID that resolves to a commit. Defaults to HEAD.
|
||||||
+
|
+
|
||||||
When this parameter names a non-branch (but still a valid commit object),
|
When this parameter names a non-branch (but still a valid commit object),
|
||||||
your HEAD becomes 'detached'.
|
your HEAD becomes 'detached'.
|
||||||
|
Loading…
Reference in New Issue
Block a user