Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-04-25 12:45:58 +0300
committerJunio C Hamano <gitster@pobox.com>2019-05-07 07:04:48 +0300
commit80f537f79c16efeb7b92b3409ede434a230b5679 (patch)
tree28b73ceb285fde7cec4ef84c4b685534887397c3 /Documentation/giteveryday.txt
parentfc991b43df83ee32a92b9d906e77276e5dbd639c (diff)
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/giteveryday.txt')
-rw-r--r--Documentation/giteveryday.txt5
1 files changed, 2 insertions, 3 deletions
diff --git a/Documentation/giteveryday.txt b/Documentation/giteveryday.txt
index ad455f3e39..1bd919f92b 100644
--- a/Documentation/giteveryday.txt
+++ b/Documentation/giteveryday.txt
@@ -51,8 +51,7 @@ following commands.
* linkgit:git-commit[1] to advance the current branch.
- * linkgit:git-reset[1] and linkgit:git-checkout[1] (with
- pathname parameters) to undo changes.
+ * linkgit:git-restore[1] to undo changes.
* linkgit:git-merge[1] to merge between local branches.
@@ -82,7 +81,7 @@ Create a topic branch and develop.::
------------
$ git switch -c alsa-audio <1>
$ edit/compile/test
-$ git checkout -- curses/ux_audio_oss.c <2>
+$ git restore curses/ux_audio_oss.c <2>
$ git add curses/ux_audio_alsa.c <3>
$ edit/compile/test
$ git diff HEAD <4>