Skip to content
Home Tutorials Roadmaps Courses
Log in Join free
Tutorials Git Git Log & Diff
Git Beginner FREE

Git Log & Diff

Lesson 1 of 17 Beginner Interactive

Git log shows commit history. Git diff shows changes between commits.

Syntax

GIT
git log --oneline --graph
git log --author="John"
git diff HEAD~1 HEAD
git diff main..feature
Git Log and Diff
BASH
# View log
git log --oneline
git log --graph --oneline --all
git log --author="Alice"
git log --since="2026-01-01"

# View diff
git diff
git diff --staged
git diff main..feature-branch

# View specific commit
git show abc1234