summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorTorsten Bögershausen <tboegi@web.de>2015-06-17 07:54:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-06-17 20:33:06 (GMT)
commitc4ac525c847fe7058a00bcc0e0f2cb436f5e7976 (patch)
treec13eaa762aa9eff9e946c14e1795b2cd67511696 /Documentation
parentf09bd215cde5e30029fe08f309d0554eb9256778 (diff)
downloadgit-c4ac525c847fe7058a00bcc0e0f2cb436f5e7976.zip
git-c4ac525c847fe7058a00bcc0e0f2cb436f5e7976.tar.gz
git-c4ac525c847fe7058a00bcc0e0f2cb436f5e7976.tar.bz2
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>
Diffstat (limited to 'Documentation')
-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 d504108..7540e02 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.