Skip to content

Commit 1b7fb5e

Browse files
authored
Merge pull request #1607 from BPylypenko/update/git-checkout--git-restore-important-note
update important note for git restore & git reset HEAD
2 parents 9620145 + 36519b7 commit 1b7fb5e

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)