From 36519b7827907f4a6cd3835cf5c6235bfff3504f Mon Sep 17 00:00:00 2001 From: Bohdan Pylypenko <49116723+BPylypenko@users.noreply.github.com> Date: Tue, 9 Feb 2021 16:51:26 +0200 Subject: [PATCH] notice that `git restore ` restores staged version --- book/02-git-basics/sections/undoing.asc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book/02-git-basics/sections/undoing.asc b/book/02-git-basics/sections/undoing.asc index 6d63e9b12..0c815dde8 100644 --- a/book/02-git-basics/sections/undoing.asc +++ b/book/02-git-basics/sections/undoing.asc @@ -137,7 +137,7 @@ You can see that the changes have been reverted. [IMPORTANT] ===== It's important to understand that `git checkout \-- ` is a dangerous command. -Any local changes you made to that file are gone -- Git just replaced that file with the most recently-committed version. +Any local changes you made to that file are gone -- Git just replaced that file with the last staged or committed version. Don't ever use this command unless you absolutely know that you don't want those unsaved local changes. ===== @@ -230,6 +230,6 @@ Changes to be committed: [IMPORTANT] ===== It's important to understand that `git restore ` is a dangerous command. -Any local changes you made to that file are gone -- Git just replaced that file with the most recently-committed version. +Any local changes you made to that file are gone -- Git just replaced that file with the last staged or committed version. Don't ever use this command unless you absolutely know that you don't want those unsaved local changes. =====