view git commit history
View git commit history in nice graphical format.
oneline
git log --oneline --graph --all
detailed
git log --graph --all --decorate=short
You can use this command to get familiar with recent efforts and understanding merges.
query for time range
git log --since="2026-01-01"
git log --before="2026-02-01"
git log --since="2026-01-01" --before="2026-02-01"
git log --since="2 weeks ago"
git log --since="3 days ago"
git log --since="yesterday"
query for author
git log --author="Elton"
how frequently a file changed in repo
git log --name-only --pretty=format: | sort | uniq -c | sort -nr | head -50
search commits for particular strings
git log -p -G "PaymentProcessor|def charge|class User" -- .
search commit messages
git log --oneline --grep="refactor\|auth\|payment"
who commited the most
git shortlog -sn
who changed the most on a particular folder
git shortlog -sn -- app/services
who commited the most in a particular folder
git shortlog -sn -- app/services
shows commit messages in reverse order useful to glance history
git log --reverse --oneline