Basic Usage

git log --oneline              # One line per commit (most useful)
git log --oneline -10          # Latest 10 commits
git log --oneline --graph --all  # Graph view of all branches
git log -p                     # Show diffs as well
git show <commit-id>           # Details of a specific commit

Search and Filter

git log --author="name"
git log --since="2026-01-01"
git log --grep="keyword"

Check Diffs

git diff
git diff HEAD~1

Key Points

  • Press q to exit git log
  • --oneline is the most readable option

If you want to bring a specific commit to another branch, see How to Use git cherry-pick to Apply a Specific Commit.

  • Fiverr - Find freelance developers and tech experts