diff --git a/Documentation/git-checkout.adoc b/Documentation/git-checkout.adoc index afc1880365..431185ca0b 100644 --- a/Documentation/git-checkout.adoc +++ b/Documentation/git-checkout.adoc @@ -75,22 +75,29 @@ Omitting __ detaches `HEAD` at the tip of the current branch. `git checkout [--] ...`:: `git checkout --pathspec-from-file= [--pathspec-file-nul]`:: - Overwrite both the index and the working tree with the - contents at the __ for the files that match the pathspec. + Replace the specified files and/or directories with the version from + the given commit or tree and add them to the index + (also known as "staging area"). ++ +For example, `git checkout main file.txt` will replace `file.txt` +with the version from `main`. `git checkout [-f|--ours|--theirs|-m|--conflict=