diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2019-04-25 11:45:58 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-05-07 06:04:48 +0200 |
commit | 80f537f79c16efeb7b92b3409ede434a230b5679 (patch) | |
tree | 28b73ceb285fde7cec4ef84c4b685534887397c3 /Documentation/gittutorial-2.txt | |
parent | user-manual.txt: prefer 'merge --abort' over 'reset --hard' (diff) | |
download | git-80f537f79c16efeb7b92b3409ede434a230b5679.tar.xz git-80f537f79c16efeb7b92b3409ede434a230b5679.zip |
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/gittutorial-2.txt')
-rw-r--r-- | Documentation/gittutorial-2.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/gittutorial-2.txt b/Documentation/gittutorial-2.txt index e0976f6017..8bdb7d0bd3 100644 --- a/Documentation/gittutorial-2.txt +++ b/Documentation/gittutorial-2.txt @@ -370,13 +370,13 @@ situation: $ git status On branch master Changes to be committed: - (use "git reset HEAD <file>..." to unstage) + (use "git restore --staged <file>..." to unstage) new file: closing.txt Changes not staged for commit: (use "git add <file>..." to update what will be committed) - (use "git checkout -- <file>..." to discard changes in working directory) + (use "git restore <file>..." to discard changes in working directory) modified: file.txt |