Commit 39470cf9 authored by Matthieu Moy's avatar Matthieu Moy Committed by Junio C Hamano

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: default avatarMatthieu Moy <[email protected]>
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent ce8936c3
......@@ -85,9 +85,13 @@ should result in deletion of the path).
<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 to checkout; may be any object ID that resolves to a
commit. Defaults to HEAD.
Branch to checkout (when no paths are given); may be any object
ID that resolves to a commit. Defaults to HEAD.
+
When this parameter names a non-branch (but still a valid commit object),
your HEAD becomes 'detached'.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment