Skip to content

Commit

Permalink
git-checkout.txt: clarify that <branch> applies when no path is given.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
moy authored and gitster committed Apr 8, 2009
1 parent ce8936c commit 39470cf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Documentation/git-checkout.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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'.
Expand Down

0 comments on commit 39470cf

Please sign in to comment.