git-rerere.txt: grammatical fixups and cleanups
[gitweb.git] / Documentation / git-checkout.txt
index 2abfbdaadb27ca9a97c23c9c00cc18fb07232d00..19510de151e60c2fad3715d74f9eef89cef9ad0b 100644 (file)
@@ -9,7 +9,7 @@ SYNOPSIS
 --------
 [verse]
 'git checkout' [-q] [-f] [[--track | --no-track] -b <new_branch> [-l]] [-m] [<branch>]
-'git checkout' [<tree-ish>] <paths>...
+'git checkout' [<tree-ish>] [--] <paths>...
 
 DESCRIPTION
 -----------
@@ -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'.
@@ -145,8 +149,8 @@ $ git checkout hello.c            <3>
 ------------
 +
 <1> switch branch
-<2> take out a file out of other commit
-<3> restore hello.c from HEAD of current branch
+<2> take a file out of another commit
+<3> restore hello.c from the index
 +
 If you have an unfortunate branch that is named `hello.c`, this
 step would be confused as an instruction to switch to that branch.