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>
Matthieu Moy committed
Apr 7, 2009 at 14:43 UTC
39470cf961e584ddb505f51bb9c452ebcfd5c569
1 file changed
+6
-2
Documentation/git-checkout.txt
+6
-2
@@ -85,9 +85,13 @@ should result in deletion of the path).
85
<new_branch>::
86
Name for the new branch.
87
88
+<tree-ish>::
89
+ Tree to checkout from (when paths are given). If not specified,
90
+ the index will be used.
91
+
92
<branch>::
89
- Branch to checkout; may be any object ID that resolves to a
90
- commit. Defaults to HEAD.
93
+ Branch to checkout (when no paths are given); may be any object
94
+ ID that resolves to a commit. Defaults to HEAD.
95
+
96
When this parameter names a non-branch (but still a valid commit object),
97
your HEAD becomes 'detached'.