🔀Git Log
Also known as git log, Commit History, Git History
A command that lists past commits, newest first. It shows who made each one.
Think of it like
Think of it like a diary of your project. Each entry says what happened, who did it and when.
Example
Jack wants to know when the login page changed. He runs git log on that one file and finds the commit in seconds.
Why it matters
It turns the history into answers: what changed, when, and by whom.
Definition
Example code
console
$ git log --oneline -3
7b8c9d0 Fix the price on the order page
9f8e7d6 Add a dark mode switch
4c5d6e7 Write the first home pageCommon mistake
Key takeaways
- 1Newest first. The latest commit is at the top.
- 2One line each. Use --oneline for a quick view.
- 3Filter it. By file, author or date.