GitCheatSheet.org logo
Home / How To

Show the log containing commit history

# Show all commits
git log

# Show the most recent 5 commits
git log -5

# Show commits on one line
git log --oneline

# Show a patch with changes introduced by each commit
# Limiting the result to the most recent two commits
git log -p -2