Ad space (banner)
🌿Git Lessons
Lesson 6 / 59

Viewing History with git log

This lesson covers checking commit history with git log. It's for anyone searching "git log usage."

git log shows your commit history so far — when each commit happened and what message it carried. Use it to look back over a project's progress.

In Try It, run git log. The long string of letters and numbers next to each commit is called a "commit hash" — a unique ID for that commit. This opens in a pager view; scroll with the arrow keys and press q to exit.

A common early mistake is not knowing about the q key and getting stuck in the pager view, unsure how to get back to the prompt — a genuinely confusing moment if you're new to the terminal. In real teams, log is routinely sorted oldest-first or newest-first and filtered down to a specific range, which makes it a go-to tool when tracking down when a bug was introduced.

Git
Try it (type this into the pseudo terminal)
git log

🧑‍💻 You can type this command into the Git pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)