From 978bffdeaaecab754942064903ee68b2e9a30220 Mon Sep 17 00:00:00 2001 From: Pessimist Date: Fri, 6 Nov 2020 08:58:37 +0800 Subject: [PATCH] `git restore` introduced in v2.23.0 --- 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 dabc510b1..ef5632231 100644 --- a/book/02-git-basics/sections/undoing.asc +++ b/book/02-git-basics/sections/undoing.asc @@ -150,9 +150,9 @@ However, anything you lose that was never committed is likely never to be seen a [[undoing_git_restore]] ==== Undoing things with git restore -Git version 2.25.0 introduced a new command: `git restore`. +Git version 2.23.0 introduced a new command: `git restore`. It's basically an alternative to `git reset` which we just covered. -From Git version 2.25.0 onwards, Git will use `git restore` instead of `git reset` for many undo operations. +From Git version 2.23.0 onwards, Git will use `git restore` instead of `git reset` for many undo operations. Let's retrace our steps, and undo things with `git restore` instead of `git reset`.