git log

Practice git log from memory. --oneline = one line per commit: short hash + message. Add --graph for ASCII branch visualisation. --all shows all branc

Show a compact one-line-per-commit history.

git log --oneline

--oneline = one line per commit: short hash + message. Add --graph for ASCII branch visualisation. --all shows all branches.

Safety: Inspect first and avoid rewriting shared history unless the team expects it.

Compact graph of the last 10 commits.

git log --oneline --decorate --graph -10

--graph draws ASCII branch topology, --decorate shows ref names, -10 limits output. The canonical "what happened recently" one-liner - alias it as git lg.

Safety: Inspect first and avoid rewriting shared history unless the team expects it.

Build the habit: GitDrill drills git log and the rest of the Git workflow until the safe first move is automatic. Try a Git drill.