Skip to content

Commit

Permalink
Merge pull request #10 from esciencecenter-digital-skills/git-restore…
Browse files Browse the repository at this point in the history
…-in-slides

Add git restore example to slides
  • Loading branch information
lyashevska authored Oct 21, 2024
2 parents 4226b5a + db9d7b3 commit a9ef599
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions modules/git-lesson/git-slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,15 @@ Which command saves <b>myfile.txt</b> to my Git repo?<br>
- **git add**&nbsp; puts files in the staging area
- **git commit**&nbsp; saves the staged content as a new commit in the local repository
- Write short, descriptive, and imperative commit messages

===

<!-- .slide: data-state="standard" -->
## Exploring history
<img src="https://esciencecenter-digital-skills.github.io/git-lesson/fig/git-restore.svg">

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`

0 comments on commit a9ef599

Please sign in to comment.