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

Viewing Changed Files Alongside History with git log --stat

This lesson covers viewing changed files alongside history with git log --stat. It's for anyone searching "git log --stat usage."

git log --stat shows, alongside the regular commit history, statistics on which files were changed by how many lines for each commit.

In Try It, run git log --stat. Alongside each commit's message, the names of changed files appear together with a visual bar showing lines added and removed.

A common early mistake is being overwhelmed by the sheer volume of information — since it shows more than a regular log, you'll want to switch between it and something more compact, like --oneline, depending on your goal. In real teams, this option is helpful for getting a rough sense of how large a given commit's change actually was.

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

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