Updated: 30 November 2025
All the refs in refs/
git log --all
All the refs in refs/heads
git log --branches
All the refs in refs/remotes
git log --remotes
All the refs in refs/tags
git log --no-walk --tags
Draw a text-based graphical representation of the commit history
git log --graph --oneline --decorate --all
Refresh git log periodically (every second) with watch utility
watch --color -n 1 git log --graph --oneline --decorate --all --color=always
Show commit which added a file
git log --diff-filter=A -- dotnet.code-workspace
Shows commits that changed a single file, including those commits that occurred before the file was given its present name.
git log --follow builtin/rev-list.c
Find commits by a particular author
git log --author='Chris Taylor'
Be very explicit, with a pretty format
git log --pretty=format:'%C(magenta)%h%Creset %C(bold)%s%C(bold yellow)%d %C(green)%ad %C(cyan)%an'