Viewing the Commit
- There are two ways to view the commit
- We can use the commit ID
git show commit-id
- We can use a relative reference using the head pointer.
git show HEAD~2
HEAD
refers to the last commit
View the file in the commit
git show HEAD~2:path/file.txt
View the files modified in the commit
git show HEAD~2 --name-only
View files name with details
git show HEAD~2 --name-status