Hands-on task
This task is step 13 of the course “Everyday Git”
Hard reset to the desired commit
In the repository /root/repo there are three commits: init (file file1.txt), second (file file2.txt) and third (file file3.txt). Completely discard the last two commits: the main branch must point at the init commit again, and the files file2.txt and file3.txt must disappear from the working tree. The working tree must be left clean.
Reference:git
What you'll practise:
- git
- git reset
- --hard
- working tree
- HEAD~2