Skip to content

Commit 36519b7

Browse files
authored
notice that git restore <file> restores staged version
1 parent 676b95d commit 36519b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ You can see that the changes have been reverted.
137137
[IMPORTANT]
138138
=====
139139
It's important to understand that `git checkout \-- <file>` is a dangerous command.
140-
Any local changes you made to that file are gone -- Git just replaced that file with the most recently-committed version.
140+
Any local changes you made to that file are gone -- Git just replaced that file with the last staged or committed version.
141141
Don't ever use this command unless you absolutely know that you don't want those unsaved local changes.
142142
=====
143143

@@ -230,6 +230,6 @@ Changes to be committed:
230230
[IMPORTANT]
231231
=====
232232
It's important to understand that `git restore <file>` is a dangerous command.
233-
Any local changes you made to that file are gone -- Git just replaced that file with the most recently-committed version.
233+
Any local changes you made to that file are gone -- Git just replaced that file with the last staged or committed version.
234234
Don't ever use this command unless you absolutely know that you don't want those unsaved local changes.
235235
=====

0 commit comments

Comments
 (0)