Command reference ยท Claude Code
/diff
Opens an interactive diff viewer for uncommitted changes and turn-by-turn diffs.
Opens an interactive diff viewer for uncommitted changes and turn-by-turn diffs. Left/right switches between git diff and Claude turns, up/down scrolls through files. From v2.1.198, the viewer automatically refreshes on external git changes.
โ WHEN TO USE IT?
Go through uncommitted changes file by file before committing
/diff after several edits, to review each changed file
Trace which change originated in which conversation turn
/diff, then switch between git diff and Claude turns with left/right
โ WHEN NOT TO?
Wanting to compare changes across multiple commits/branches
/diff only shows uncommitted changes and turn-by-turn diffs, not commit history
Better: use a normal 'git diff <ref1> <ref2>' in the terminal for cross-commit comparisons
SOURCES
- Claude Code Doku (offiziell) โ code.claude.com