Skip to content

Commit a9ef599

Browse files
authored
Merge pull request #10 from esciencecenter-digital-skills/git-restore-in-slides
Add git restore example to slides
2 parents 4226b5a + db9d7b3 commit a9ef599

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

modules/git-lesson/git-slides.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,15 @@ Which command saves <b>myfile.txt</b> to my Git repo?<br>
160160
- **git add**&nbsp; puts files in the staging area
161161
- **git commit**&nbsp; saves the staged content as a new commit in the local repository
162162
- Write short, descriptive, and imperative commit messages
163+
164+
===
165+
166+
<!-- .slide: data-state="standard" -->
167+
## Exploring history
168+
<img src="https://esciencecenter-digital-skills.github.io/git-lesson/fig/git-restore.svg">
169+
170+
Use `git restore` with the `-s` option to retrieve a specific state.
171+
172+
Note:
173+
In this example we restore to the state before the most recent commit,
174+
which is `HEAD~1` or `f22b25e`

0 commit comments

Comments
 (0)