From 45158cf82e073efe11a428583f51cbe79c9b0c55 Mon Sep 17 00:00:00 2001 From: James Skemp Date: Fri, 13 Oct 2023 17:19:59 -0500 Subject: [PATCH] Add command to reset last commit --- src/commits.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/commits.md b/src/commits.md index ba96d4a..21289a0 100644 --- a/src/commits.md +++ b/src/commits.md @@ -80,6 +80,9 @@ git reset # Selectively unstage changes to files. git reset -p +# Hard reset the current branch back one commit. +git reset --hard HEAD^ + # Discard changes to a file git checkout --