From: Julia Evans via GitGitGadget Date: Fri, 29 Aug 2025 11:45:34 GMT Subject: [PATCH v2 5/5] doc: git-checkout: clarify restoring files section Message-ID: <9c0119e70d6bdb49a8b46ae74e12c4827a7a9173.1756467934.git.gitgitgadget@gmail.com> In-Reply-To: From: Julia Evans - Split up the forms `git checkout file.txt` and `git checkout main file.txt` to match what's given in the SYNOPSIS - Remove `-f` from the SYNOPSIS for the second form, since according to this man page it is not relevant in that context - Many Git users do not know what a "tree-ish" is. Clarify by using an example of each case, and by saying "commit or tree" in the text instead of "" - Many Git users do not know what the "index" is. Instead say "stage the file's contents" where appropriate, since Git often uses "stage" as a verb to mean the same thing as "add to the index" and it's a more familiar term. - Use "Discard unstaged changes" instead of "checking out paths from the index" where relevant Signed-off-by: Julia Evans --- Documentation/git-checkout.adoc | 45 ++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/Documentation/git-checkout.adoc b/Documentation/git-checkout.adoc index 4d522a5f75..dababe452a 100644 --- a/Documentation/git-checkout.adoc +++ b/Documentation/git-checkout.adoc @@ -12,8 +12,8 @@ git checkout [-q] [-f] [-m] [] git checkout [-q] [-f] [-m] --detach [] git checkout [-q] [-f] [-m] [--detach] git checkout [-q] [-f] [-m] [[-b|-B|--orphan] ] [] -git checkout [-f] [--] ... -git checkout [-f] --pathspec-from-file= [--pathspec-file-nul] +git checkout [--] ... +git checkout --pathspec-from-file= [--pathspec-file-nul] git checkout [-f|--ours|--theirs|-m|--conflict=