AI Hints
Home›Git & GitHub Tutorial›Reading History
Git & GitHub · Lesson 13 of 144

Reading History

Git log.

⏱ 2 min read▶ Video at 13:07🎓 Free
Watch this lesson in the Git & GitHub courseWatch on YouTube ↗Full Git & GitHub course

You've made a few commits. Now let's read them back. Git log shows the history of your project, newest commit first.

Reading History
From the video: Reading History
  • Your commits are saved
  • git log reads them back
  • Newest first

git log

Here's a repository with three commits. Type git log. Each block is one commit. The long code at the top is its ID. Then the author, the date, and the message. The newest commit, add about page, is at the top. The very first commit, add home page, is at the bottom.

git
git log
commit 678411907eeca6e9f2c48c417d0c96912d909526 (HEAD -> main)
Author: Sam Lee <sam@example.com>
Date:   Mon Jan 5 09:15:59 2026 +0000

    Add about page

commit 0ba60493a48cb096b47f4185907bdd36bfbed69c
Author: Sam Lee <sam@example.com>
Date:   Mon Jan 5 09:11:25 2026 +0000

    Add welcome text

commit f7d9757e899f1844f7dcf3caf9ae7a1189cc8855
Author: Sam Lee <sam@example.com>
Date:   Mon Jan 5 09:06:51 2026 +0000

    Add home page

Reading one commit

Let's read one block slowly. Commit, followed by a long ID. Author, with the name and email you set in git config. Date, when it was made. And then, indented, the message. Every commit has these same parts.

keyvalue
commitits unique ID
Authorname and email
Datewhen it was made
Messagewhat and why

Summary

git log shows every commit, newest first, with its ID, author, date and message. Next, a much shorter way to read it.

Key takeaways
  • git log
  • Newest first
  • ID, author, date, message
Next up: The Short Log — git log --oneline