diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2019-04-25 16:45:58 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-05-07 13:04:48 +0900 |
commit | 80f537f79c16efeb7b92b3409ede434a230b5679 (patch) | |
tree | 28b73ceb285fde7cec4ef84c4b685534887397c3 /Documentation/git-revert.txt | |
parent | fc991b43df83ee32a92b9d906e77276e5dbd639c (diff) | |
download | git-80f537f79c16efeb7b92b3409ede434a230b5679.tar.gz |
doc: promote "git restore"
The new command "git restore" (together with "git switch") are added
to avoid the confusion of one-command-do-all "git checkout" for new
users. They are also helpful to avoid ambiguous context.
For these reasons, promote it everywhere possible. This includes
documentation, suggestions/advice from other commands.
One nice thing about git-restore is the ability to restore
"everything", so it can be used in "git status" advice instead of both
"git checkout" and "git reset". The three commands suggested by "git
status" are add, rm and restore.
"git checkout" is also removed from "git help" (i.e. it's no longer
considered a commonly used command)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-revert.txt')
-rw-r--r-- | Documentation/git-revert.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt index 018ecf49d3..9aadc36881 100644 --- a/Documentation/git-revert.txt +++ b/Documentation/git-revert.txt @@ -26,8 +26,8 @@ effect of some earlier commits (often only a faulty one). If you want to throw away all uncommitted changes in your working directory, you should see linkgit:git-reset[1], particularly the `--hard` option. If you want to extract specific files as they were in another commit, you -should see linkgit:git-checkout[1], specifically the `git checkout -<commit> -- <filename>` syntax. Take care with these alternatives as +should see linkgit:git-restore[1], specifically the `--source` +option. Take care with these alternatives as both will discard uncommitted changes in your working directory. See "Reset, restore and revert" in linkgit:git[1] for the differences |