git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v4 11/13] doc: checkout: synchronize <pathspec> description

From
AGAlexandr Miloslavskiy via GitGitGadget <gitgitgadget@gmail.com>
Date
Dec 3, 2019, 14:02 UTC
Message-ID
<fd166755aa137b03f738601826c42ac64ae89771.1575381738.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.445.v4.git.1575381738.gitgitgadget@gmail.com>
From: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
`git add` shows an example of good writing, follow it.
Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
---
 Documentation/git-checkout.txt | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index d47046e050..93124f3ad9 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -12,13 +12,13 @@ SYNOPSIS
 'git checkout' [-q] [-f] [-m] --detach [<branch>]
 'git checkout' [-q] [-f] [-m] [--detach] <commit>
 'git checkout' [-q] [-f] [-m] [[-b|-B|--orphan] <new_branch>] [<start_point>]
-'git checkout' [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>...
-'git checkout' (-p|--patch) [<tree-ish>] [--] [<paths>...]
+'git checkout' [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <pathspec>...
+'git checkout' (-p|--patch) [<tree-ish>] [--] [<pathspec>...]
 
 DESCRIPTION
 -----------
 Updates files in the working tree to match the version in the index
-or the specified tree.  If no paths are given, 'git checkout' will
+or the specified tree.  If no pathspec was given, 'git checkout' will
 also update `HEAD` to set the specified branch as the current
 branch.
 
@@ -78,13 +78,13 @@ be used to detach `HEAD` at the tip of the branch (`git checkout
 +
 Omitting `<branch>` detaches `HEAD` at the tip of the current branch.
 
-'git checkout' [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>...::
+'git checkout' [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <pathspec>...::
 
-	Overwrite paths in the working tree by replacing with the
-	contents in the index or in the `<tree-ish>` (most often a
-	commit).  When a `<tree-ish>` is given, the paths that
-	match the `<pathspec>` are updated both in the index and in
-	the working tree.
+	Overwrite the contents of the files that match the pathspec.
+	When the `<tree-ish>` (most often a commit) is not given, 
+	overwrite working tree with the contents in the index.
+	When the `<tree-ish>` is given, overwrite both the index and
+	the working tree with the contents at the `<tree-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
@@ -336,7 +336,13 @@ leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
 	Tree to checkout from (when paths are given). If not specified,
 	the index will be used.
 
+\--::
+	Do not interpret any more arguments as options.
 
+<pathspec>...::
+	Limits the paths affected by the operation.
++
+For more details, see the 'pathspec' entry in linkgit:gitglossary[7].
 
 DETACHED HEAD
 -------------
-- 
gitgitgadget
Previous: Alexandr Miloslavskiy via GitGitGadgetNext: Alexandr Miloslavskiy via GitGitGadget
Message 75 of 80 in “Add --pathspec-from-file option for reset, commit”
  1. 0/5 Add --pathspec-from-file option for reset, commitAlexandr Miloslavskiy via GitGitGadget, Nov 4, 2019
  2. 1/5 pathspec: add new function to parse fileAlexandr Miloslavskiy via GitGitGadget, Nov 4, 2019
  3. Phillip WoodNov 5, 2019
  4. Alexandr MiloslavskiyNov 5, 2019
  5. Alexandr MiloslavskiyNov 6, 2019
  6. 3/5 reset: support the --pathspec-from-file optionAlexandr Miloslavskiy via GitGitGadget, Nov 4, 2019
  7. Phillip WoodNov 5, 2019
  8. Phillip WoodNov 5, 2019
  9. Alexandr MiloslavskiyNov 5, 2019
  10. Alexandr MiloslavskiyNov 6, 2019
  11. Phillip WoodNov 5, 2019
  12. Alexandr MiloslavskiyNov 5, 2019
  13. Junio C HamanoNov 6, 2019
  14. Alexandr MiloslavskiyNov 6, 2019
  15. 4/5 doc: commit: unify <pathspec> descriptionAlexandr Miloslavskiy via GitGitGadget, Nov 4, 2019
  16. Junio C HamanoNov 6, 2019
  17. Alexandr MiloslavskiyNov 6, 2019
  18. Junio C HamanoNov 7, 2019
  19. Alexandr MiloslavskiyNov 7, 2019
  20. 5/5 commit: support the --pathspec-from-file optionAlexandr Miloslavskiy via GitGitGadget, Nov 4, 2019
  21. Phillip WoodNov 5, 2019
  22. Alexandr MiloslavskiyNov 5, 2019
  23. Alexandr MiloslavskiyNov 6, 2019
  24. Phillip WoodDec 10, 2019
  25. Alexandr MiloslavskiyDec 11, 2019
  26. Phillip WoodDec 11, 2019
  27. Alexandr MiloslavskiyDec 11, 2019
  28. Junio C HamanoDec 11, 2019
  29. Alexandr MiloslavskiyDec 11, 2019
  30. Alexandr MiloslavskiyDec 12, 2019
  31. Junio C HamanoNov 6, 2019
  32. 2/5 doc: reset: unify <pathspec> descriptionAlexandr Miloslavskiy via GitGitGadget, Nov 4, 2019
  33. Junio C HamanoNov 6, 2019
  34. Alexandr MiloslavskiyNov 6, 2019
  35. Junio C HamanoNov 7, 2019
  36. Alexandr MiloslavskiyNov 7, 2019
  37. Junio C HamanoNov 8, 2019
  38. 0/6 Add --pathspec-from-file option for reset, commitAlexandr Miloslavskiy via GitGitGadget, Nov 6, 2019
  39. 1/6 parse-options.h: add new options `--pathspec-from-file`, `--pathspec-file-nul`Alexandr Miloslavskiy via GitGitGadget, Nov 6, 2019
  40. 2/6 pathspec: add new function to parse fileAlexandr Miloslavskiy via GitGitGadget, Nov 6, 2019
  41. Junio C HamanoNov 19, 2019
  42. Alexandr MiloslavskiyNov 19, 2019
  43. 3/6 doc: reset: unify <pathspec> descriptionAlexandr Miloslavskiy via GitGitGadget, Nov 6, 2019
  44. Junio C HamanoNov 19, 2019
  45. Alexandr MiloslavskiyNov 19, 2019
  46. 6/6 commit: support the --pathspec-from-file optionAlexandr Miloslavskiy via GitGitGadget, Nov 6, 2019
  47. Junio C HamanoNov 19, 2019
  48. Alexandr MiloslavskiyNov 19, 2019
  49. 5/6 doc: commit: unify <pathspec> descriptionAlexandr Miloslavskiy via GitGitGadget, Nov 6, 2019
  50. Junio C HamanoNov 19, 2019
  51. Alexandr MiloslavskiyNov 19, 2019
  52. Alexandr MiloslavskiyNov 19, 2019
  53. 4/6 reset: support the `--pathspec-from-file` optionAlexandr Miloslavskiy via GitGitGadget, Nov 6, 2019
  54. 0/6 Add --pathspec-from-file option for reset, commitAlexandr Miloslavskiy via GitGitGadget, Nov 19, 2019
  55. 3/6 doc: reset: synchronize <pathspec> descriptionAlexandr Miloslavskiy via GitGitGadget, Nov 19, 2019
  56. 2/6 pathspec: add new function to parse fileAlexandr Miloslavskiy via GitGitGadget, Nov 19, 2019
  57. 5/6 doc: commit: synchronize <pathspec> descriptionAlexandr Miloslavskiy via GitGitGadget, Nov 19, 2019
  58. 4/6 reset: support the `--pathspec-from-file` optionAlexandr Miloslavskiy via GitGitGadget, Nov 19, 2019
  59. 1/6 parse-options.h: add new options `--pathspec-from-file`, `--pathspec-file-nul`Alexandr Miloslavskiy via GitGitGadget, Nov 19, 2019
  60. 6/6 commit: support the --pathspec-from-file optionAlexandr Miloslavskiy via GitGitGadget, Nov 19, 2019
  61. Junio C HamanoNov 20, 2019
  62. Alexandr MiloslavskiyNov 20, 2019
  63. 00/13 Add --pathspec-from-file optionAlexandr Miloslavskiy via GitGitGadget, Dec 3, 2019
  64. 01/13 parse-options.h: add new options `--pathspec-from-file`, `--pathspec-file-nul`Alexandr Miloslavskiy via GitGitGadget, Dec 3, 2019
  65. 03/13 doc: reset: synchronize <pathspec> descriptionAlexandr Miloslavskiy via GitGitGadget, Dec 3, 2019
  66. 02/13 pathspec: add new function to parse fileAlexandr Miloslavskiy via GitGitGadget, Dec 3, 2019
  67. 05/13 doc: commit: synchronize <pathspec> descriptionAlexandr Miloslavskiy via GitGitGadget, Dec 3, 2019
  68. 06/13 commit: support the --pathspec-from-file optionAlexandr Miloslavskiy via GitGitGadget, Dec 3, 2019
  69. 10/13 doc: checkout: fix broken text referenceAlexandr Miloslavskiy via GitGitGadget, Dec 3, 2019
  70. 07/13 cmd_add: prepare for next patchAlexandr Miloslavskiy via GitGitGadget, Dec 3, 2019
  71. 09/13 doc: checkout: remove duplicate synopsisAlexandr Miloslavskiy via GitGitGadget, Dec 3, 2019
  72. 04/13 reset: support the `--pathspec-from-file` optionAlexandr Miloslavskiy via GitGitGadget, Dec 3, 2019
  73. 08/13 add: support the --pathspec-from-file optionAlexandr Miloslavskiy via GitGitGadget, Dec 3, 2019
  74. 13/13 checkout, restore: support the --pathspec-from-file optionAlexandr Miloslavskiy via GitGitGadget, Dec 3, 2019
  75. 11/13 doc: checkout: synchronize <pathspec> descriptionAlexandr Miloslavskiy via GitGitGadget, Dec 3, 2019
  76. 12/13 doc: restore: synchronize <pathspec> descriptionAlexandr Miloslavskiy via GitGitGadget, Dec 3, 2019
  77. Junio C HamanoDec 3, 2019
  78. Alexandr MiloslavskiyDec 3, 2019
  79. Junio C HamanoDec 4, 2019
  80. Alexandr MiloslavskiyDec 5, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.