Skip to content

Commit ff132a1

Browse files
committed
Merge branch 'tb/checkout-doc' into maint
Doc update. * tb/checkout-doc: git-checkout.txt: document "git checkout <pathspec>" better
2 parents 3afcec9 + c4ac525 commit ff132a1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Documentation/git-checkout.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ git-checkout(1)
33

44
NAME
55
----
6-
git-checkout - Checkout a branch or paths to the working tree
6+
git-checkout - Switch branches or restore working tree files
77

88
SYNOPSIS
99
--------
@@ -89,6 +89,10 @@ Omitting <branch> detaches HEAD at the tip of the current branch.
8989
(i.e. commit, tag or tree) to update the index for the given
9090
paths before updating the working tree.
9191
+
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+
+
9296
The index may contain unmerged entries because of a previous failed merge.
9397
By default, if you try to check out such an entry from the index, the
9498
checkout operation will fail and nothing will be checked out.

0 commit comments

Comments
 (0)