Git: View History (git log)
List History of Commit ID
git log -3
show last 3 commits.
This command is important because it shows the Commit ID . You'll need to use the ID when doing git diff or other git operations. .
List History of Commit ID of a Specific File
git log -3 -- myfilepath
show last 3 commits of a specific file.
How to see last change?
Show diff in last 2 commits of file
git log --patch -2 --color -- myfilepath
--patch means output in patch diff format.
Show diff in last 2 commits
git log --patch -2 --color
Reference
git help log