History
History
Compact one-line log
$ git log --oneline
Graph view with branches
$ git log --oneline --graph --all
Shows the full branch topology in ASCII art.
Filter by author
$ git log --author="Branko" --oneline
Matches against the author name or email. Supports regex.
Filter by date range
$ git log --after="2025-01-01" --before="2025-06-30" --oneline
Filter by file path
$ git log -- path/to/file --oneline
Shows only commits that modified the specified file.
Custom format
$ git log --format="%h %an %s" -10
Common placeholders: %h (short hash), %an (author name),
%s (subject), %ar (relative date), %d (refs).
Show changes in each commit
$ git log -p -3
Combines log output with the full diff for the last 3 commits.
Count commits per author
$ git shortlog -sn
Useful for understanding contribution distribution.