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

Viewing History Compactly with git log --oneline

This lesson covers displaying history compactly with the git log --oneline option. It's for anyone searching "git log --oneline usage."

git log --oneline displays each commit more compactly, one line at a time, compared to a regular git log. Handy when you want to scan a lot of history at once.

In Try It, run git log --oneline. Just a shortened commit hash and the commit message appear, listed simply one per line.

A common early mistake is not knowing when to reach for this over regular git log — use the regular log when you need detail like author and date, and --oneline when you just want the big picture at a glance; picking the right one for the moment is efficient. In real teams, this option gets used constantly on projects with a huge number of commits, when you need to scan the history quickly.

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

🧑‍💻 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)