Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add git restore example to slides #10

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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`
Loading