@@ -12,13 +12,13 @@ SYNOPSIS
12
12
'git checkout' [-q] [-f] [-m] --detach [<branch>]
13
13
'git checkout' [-q] [-f] [-m] [--detach] <commit>
14
14
'git checkout' [-q] [-f] [-m] [[-b|-B|--orphan] <new_branch>] [<start_point>]
15
- 'git checkout' [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths >...
16
- 'git checkout' (-p|--patch) [<tree-ish>] [--] [<paths >...]
15
+ 'git checkout' [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <pathspec >...
16
+ 'git checkout' (-p|--patch) [<tree-ish>] [--] [<pathspec >...]
17
17
18
18
DESCRIPTION
19
19
-----------
20
20
Updates files in the working tree to match the version in the index
21
- or the specified tree. If no paths are given, 'git checkout' will
21
+ or the specified tree. If no pathspec was given, 'git checkout' will
22
22
also update `HEAD` to set the specified branch as the current
23
23
branch.
24
24
@@ -78,13 +78,13 @@ be used to detach `HEAD` at the tip of the branch (`git checkout
78
78
+
79
79
Omitting `<branch>` detaches `HEAD` at the tip of the current branch.
80
80
81
- 'git checkout' [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths >...::
81
+ 'git checkout' [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <pathspec >...::
82
82
83
- Overwrite paths in the working tree by replacing with the
84
- contents in the index or in the `<tree-ish>` (most often a
85
- commit). When a `<tree-ish>` is given, the paths that
86
- match the `<pathspec >` are updated both in the index and in
87
- the working tree.
83
+ Overwrite the contents of the files that match the pathspec.
84
+ When the `<tree-ish>` (most often a commit) is not given,
85
+ overwrite working tree with the contents in the index.
86
+ When the `<tree-ish >` is given, overwrite both the index and
87
+ the working tree with the contents at the `<tree-ish>` .
88
88
+
89
89
The index may contain unmerged entries because of a previous failed merge.
90
90
By default, if you try to check out such an entry from the index, the
@@ -336,7 +336,13 @@ leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
336
336
Tree to checkout from (when paths are given). If not specified,
337
337
the index will be used.
338
338
339
+ \--::
340
+ Do not interpret any more arguments as options.
339
341
342
+ <pathspec>...::
343
+ Limits the paths affected by the operation.
344
+ +
345
+ For more details, see the 'pathspec' entry in linkgit:gitglossary[7].
340
346
341
347
DETACHED HEAD
342
348
-------------
0 commit comments