Git: View History/Log
How to get a history of commits?
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. .
git log 2022-11-17
How to see last change?
git log -p -2 --color
-
show diff in last 2 commits.
-p
or--patch
means generate patch diff format.git log diff
git help log