Skip to content
BENIBIX Learn

Git Log

Development🔀 Version ControlGit Basics

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

Git log lists the commits in your history, newest first. Each one shows its hash, its author, its date and its message. Options make the list short or add detail. A one-line view shows just the short hash and the title. You can also filter it, by author, by date or by file.

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 page
The last three commits, one line each: short hash and title.
On the right, git log lists commits by short hash and title.

Common mistake

Scrolling the full log by hand. Filter it by file or author to find the commit fast.

Key takeaways

  1. 1
    Newest first. The latest commit is at the top.
  2. 2
    One line each. Use --oneline for a quick view.
  3. 3
    Filter it. By file, author or date.

Learn it properly