--stat

Flags for git diff, git log and git show that summarise a change per file instead of printing every line: --stat counts lines and --name-status gives a letter per file.

In more detail

--stat prints each changed file with a count of inserted and deleted lines and a small bar. --name-status prints only a status letter, such as M for modified, A for added or D for deleted, and the path. Use them to see what a change touches before reading it in full.

Examples

git log --oneline --stat -1 HEAD~1
git diff --name-status HEAD~4..HEAD~2

Related terms

Taught in

References