path: root/Documentation/git-format-patch.txt
diff options
authorNguyễn Thái Ngọc Duy <>2019-04-25 09:45:58 (GMT)
committerJunio C Hamano <>2019-05-07 04:04:48 (GMT)
commit80f537f79c16efeb7b92b3409ede434a230b5679 (patch)
tree28b73ceb285fde7cec4ef84c4b685534887397c3 /Documentation/git-format-patch.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 <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/git-format-patch.txt')
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
index 0a24a56..01bfcec 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -422,7 +422,7 @@ One way to test if your MUA is set up correctly is:
$ git fetch <project> master:test-apply
$ git switch test-apply
- $ git reset --hard
+ $ git restore --source=HEAD --staged --worktree :/
$ git am a.patch
If it does not apply correctly, there can be various reasons.