From 30cca9023bdde5dc2e423fe5c5e6f82281493f67 Mon Sep 17 00:00:00 2001 From: Knut Franke <43853514+sckfranke@users.noreply.github.com> Date: Wed, 17 Sep 2025 19:53:34 +0200 Subject: [PATCH] cheat sheet: Suggest git-restore for discarding changes In modern versions of Git, `git status` will suggest using `git restore` in these cases. Also, in all other instances, the cheat sheet already lists `git switch` or `git restore` alternatives to `git checkout`. --- content/cheat-sheet/_index.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/cheat-sheet/_index.html b/content/cheat-sheet/_index.html index 9703b99adf..174e6548c7 100644 --- a/content/cheat-sheet/_index.html +++ b/content/cheat-sheet/_index.html @@ -212,10 +212,14 @@
git restore <file>
+ OR
git checkout <file>
git restore --staged --worktree <file>
+ OR
git checkout HEAD <file>