summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-07-27 12:21:47 -0700
committerJunio C Hamano <gitster@pobox.com>2015-07-27 12:21:47 -0700
commitff132a190ec5c99ffd8ff2bef947f230d4ac64c2 (patch)
treee352c0c2b49fcdb759f41fef8a1a8dd5ce320b91
parent3afcec9057ed2c13338ab53a9fa34b8a031e5b23 (diff)
parentc4ac525c847fe7058a00bcc0e0f2cb436f5e7976 (diff)
downloadgit-ff132a190ec5c99ffd8ff2bef947f230d4ac64c2.tar.gz
Merge branch 'tb/checkout-doc' into maint
Doc update. * tb/checkout-doc: git-checkout.txt: document "git checkout <pathspec>" better
-rw-r--r--Documentation/git-checkout.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index d5041082e8..7540e026f5 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -3,7 +3,7 @@ git-checkout(1)
NAME
----
-git-checkout - Checkout a branch or paths to the working tree
+git-checkout - Switch branches or restore working tree files
SYNOPSIS
--------
@@ -89,6 +89,10 @@ Omitting <branch> detaches HEAD at the tip of the current branch.
(i.e. commit, tag or tree) to update the index for the given
paths before updating the working tree.
+
+'git checkout' with <paths> or `--patch` is used to restore modified or
+deleted paths to their original contents from the index or replace paths
+with the contents from a named <tree-ish> (most often a commit-ish).
++
The index may contain unmerged entries because of a previous failed merge.
By default, if you try to check out such an entry from the index, the
checkout operation will fail and nothing will be checked out.