From c898c52abb792b73bb7d8f2869addb84999710a3 Mon Sep 17 00:00:00 2001 From: Esben Madsen Date: Wed, 24 Feb 2021 10:13:19 +0100 Subject: [PATCH] Improve the git reset exercise to show that reset --hard actually removes files added to the staging area --- reset/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/reset/README.md b/reset/README.md index fd6059b2..36a5ffcb 100644 --- a/reset/README.md +++ b/reset/README.md @@ -15,10 +15,12 @@ We use reset to unstage change, but we can also do many more different things. 4. What happens to your working directory, your log and your stage? 5. Run `git reset --mixed HEAD~1` 6. What happens to your working directory, your log and your stage? -7. Run `git reset --hard HEAD~1` +7. Run `git add 10.txt` and modify the file without adding it again 8. What happens to your working directory, your log and your stage? -9. Now try to use `git revert HEAD~1` +9. Run `git reset --hard HEAD~1` 10. What happens to your working directory, your log and your stage? +11. Now try to use `git revert HEAD~1` +12. What happens to your working directory, your log and your stage? ## Useful commands