git log
command
Shows the commit history. Highly customizable with formatting and filtering options.
Syntax
git log [options] [paths]
Example
bash
git log
git log --oneline
git log --oneline --graph --all
git log -10 # last 10 commits
git log --author="Alice"
git log --since="2024-01-01"
git log --grep="fix bug"
git log -- src/app.js # commits affecting file
git log --format="%h %s %an %ar" # custom format