diff --git a/modules/git-lesson/git-slides.md b/modules/git-lesson/git-slides.md index 7e75b3c..2ba4e0d 100644 --- a/modules/git-lesson/git-slides.md +++ b/modules/git-lesson/git-slides.md @@ -160,3 +160,15 @@ Which command saves myfile.txt to my Git repo?
- **git add**  puts files in the staging area - **git commit**  saves the staged content as a new commit in the local repository - Write short, descriptive, and imperative commit messages + +=== + + +## Exploring history + + +Use `git restore` with the `-s` option to retrieve a specific state. + +Note: +In this example we restore to the state before the most recent commit, +which is `HEAD~1` or `f22b25e`