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

Visualizing History with git log --graph

This lesson covers visualizing history with git log --graph. It's for anyone searching "git log --graph usage."

git log --graph visually renders branch splits and merges using a character-based graph. Handy when you want to grasp a complex sequence of branches.

In Try It, run git log --graph. Commit history is represented with lines and asterisks, making it easy to see where branches split off and where they merged back together.

A common early mistake is finding the output cluttered once there are a lot of branches, making it counterproductively hard to read — combining it with the --oneline option gives a more compact, readable display. In real teams, this option is put to use on projects where multiple people are developing in parallel, whenever you need a quick overview of the full branch landscape.

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

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