Skip to content

Commit 4c95573

Browse files
committed
git status now proposes git restore
rather than `git checkout --` for discarding changes in working directory. Change made using: git sed '(use "git checkout -- <file>\.\.\." to discard changes in working directory)' '(use "git restore <file>..." to discard changes in working directory)' but manually checked that all matches are about `git status` outputs or about outputs of commands that also have this change, namely: * `git stash apply` * `git stash branch <new branch name>`
1 parent a013e32 commit 4c95573

4 files changed

Lines changed: 15 additions & 15 deletions

File tree

‎book/02-git-basics/sections/recording-changes.asc‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Changes to be committed:
114114
115115
Changes not staged for commit:
116116
(use "git add <file>..." to update what will be committed)
117-
(use "git checkout -- <file>..." to discard changes in working directory)
117+
(use "git restore <file>..." to discard changes in working directory)
118118
119119
modified: CONTRIBUTING.md
120120
@@ -159,7 +159,7 @@ Changes to be committed:
159159
160160
Changes not staged for commit:
161161
(use "git add <file>..." to update what will be committed)
162-
(use "git checkout -- <file>..." to discard changes in working directory)
162+
(use "git restore <file>..." to discard changes in working directory)
163163
164164
modified: CONTRIBUTING.md
165165
@@ -299,7 +299,7 @@ Changes to be committed:
299299
300300
Changes not staged for commit:
301301
(use "git add <file>..." to update what will be committed)
302-
(use "git checkout -- <file>..." to discard changes in working directory)
302+
(use "git restore <file>..." to discard changes in working directory)
303303
304304
modified: CONTRIBUTING.md
305305
----
@@ -363,7 +363,7 @@ Changes to be committed:
363363
364364
Changes not staged for commit:
365365
(use "git add <file>..." to update what will be committed)
366-
(use "git checkout -- <file>..." to discard changes in working directory)
366+
(use "git restore <file>..." to discard changes in working directory)
367367
368368
modified: CONTRIBUTING.md
369369
----
@@ -497,7 +497,7 @@ On branch master
497497
Your branch is up-to-date with 'origin/master'.
498498
Changes not staged for commit:
499499
(use "git add <file>..." to update what will be committed)
500-
(use "git checkout -- <file>..." to discard changes in working directory)
500+
(use "git restore <file>..." to discard changes in working directory)
501501
502502
modified: CONTRIBUTING.md
503503
@@ -528,7 +528,7 @@ On branch master
528528
Your branch is up-to-date with 'origin/master'.
529529
Changes not staged for commit:
530530
(use "git add/rm <file>..." to update what will be committed)
531-
(use "git checkout -- <file>..." to discard changes in working directory)
531+
(use "git restore <file>..." to discard changes in working directory)
532532
533533
deleted: PROJECTS.md
534534

‎book/02-git-basics/sections/undoing.asc‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Changes to be committed:
8484
8585
Changes not staged for commit:
8686
(use "git add <file>..." to update what will be committed)
87-
(use "git checkout -- <file>..." to discard changes in working directory)
87+
(use "git restore <file>..." to discard changes in working directory)
8888
8989
modified: CONTRIBUTING.md
9090
----
@@ -112,7 +112,7 @@ In the last example output, the unstaged area looks like this:
112112
----
113113
Changes not staged for commit:
114114
(use "git add <file>..." to update what will be committed)
115-
(use "git checkout -- <file>..." to discard changes in working directory)
115+
(use "git restore <file>..." to discard changes in working directory)
116116
117117
modified: CONTRIBUTING.md
118118
----

‎book/07-git-tools/sections/stashing-cleaning.asc‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Changes to be committed:
3232
3333
Changes not staged for commit:
3434
(use "git add <file>..." to update what will be committed)
35-
(use "git checkout -- <file>..." to discard changes in working directory)
35+
(use "git restore <file>..." to discard changes in working directory)
3636
3737
modified: lib/simplegit.rb
3838
----
@@ -80,7 +80,7 @@ $ git stash apply
8080
On branch master
8181
Changes not staged for commit:
8282
(use "git add <file>..." to update what will be committed)
83-
(use "git checkout -- <file>..." to discard changes in working directory)
83+
(use "git restore <file>..." to discard changes in working directory)
8484
8585
modified: index.html
8686
modified: lib/simplegit.rb
@@ -109,7 +109,7 @@ Changes to be committed:
109109
110110
Changes not staged for commit:
111111
(use "git add <file>..." to update what will be committed)
112-
(use "git checkout -- <file>..." to discard changes in working directory)
112+
(use "git restore <file>..." to discard changes in working directory)
113113
114114
modified: lib/simplegit.rb
115115
----
@@ -214,7 +214,7 @@ Changes to be committed:
214214
215215
Changes not staged for commit:
216216
(use "git add <file>..." to update what will be committed)
217-
(use "git checkout -- <file>..." to discard changes in working directory)
217+
(use "git restore <file>..." to discard changes in working directory)
218218
219219
modified: lib/simplegit.rb
220220

‎book/07-git-tools/sections/submodules.asc‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ Your branch is up-to-date with 'origin/master'.
293293
294294
Changes not staged for commit:
295295
(use "git add <file>..." to update what will be committed)
296-
(use "git checkout -- <file>..." to discard changes in working directory)
296+
(use "git restore <file>..." to discard changes in working directory)
297297
298298
modified: .gitmodules
299299
modified: DbConnector (new commits)
@@ -313,7 +313,7 @@ Your branch is up-to-date with 'origin/master'.
313313
314314
Changes not staged for commit:
315315
(use "git add <file>..." to update what will be committed)
316-
(use "git checkout -- <file>..." to discard changes in working directory)
316+
(use "git restore <file>..." to discard changes in working directory)
317317
318318
modified: .gitmodules
319319
modified: DbConnector (new commits)
@@ -400,7 +400,7 @@ $ git status
400400
Your branch is up-to-date with 'origin/master'.
401401
Changes not staged for commit:
402402
(use "git add <file>..." to update what will be committed)
403-
(use "git checkout -- <file>..." to discard changes in working directory)
403+
(use "git restore <file>..." to discard changes in working directory)
404404
405405
modified: DbConnector (new commits)
406406

0 commit comments

Comments
 (0)