git-checkout.txt: document "git checkout <pathspec>" better
git checkout <pathspec> can be used to reset changes in the working tree. Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Torsten Bögershausen committed
Jun 17, 2015 at 09:54 UTC
c4ac525c847fe7058a00bcc0e0f2cb436f5e7976
1 file changed
+5
-1
Documentation/git-checkout.txt
+5
-1
@@ -3,7 +3,7 @@ git-checkout(1)
3
4
NAME
5
----
6
-git-checkout - Checkout a branch or paths to the working tree
6
+git-checkout - Switch branches or restore working tree files
7
8
SYNOPSIS
9
--------
@@ -89,6 +89,10 @@ Omitting <branch> detaches HEAD at the tip of the current branch.
89
(i.e. commit, tag or tree) to update the index for the given
90
paths before updating the working tree.
91
+
92
+'git checkout' with <paths> or `--patch` is used to restore modified or
93
+deleted paths to their original contents from the index or replace paths
94
+with the contents from a named <tree-ish> (most often a commit-ish).
95
++
96
The index may contain unmerged entries because of a previous failed merge.
97
By default, if you try to check out such an entry from the index, the
98
checkout operation will fail and nothing will be checked out.