A diff looks simple until whitespace, line endings and moved blocks make it lie to you. Things worth knowing:

1. Line endings create phantom changes

CRLF vs LF turns every line into a "change". Normalize with .gitattributes (* text=auto) and configure your editor.

2. Whitespace-only noise

Use git diff -w or --ignore-space-change when reviewing reformatting commits, then review the real changes separately.

3. Pick the right algorithm

Myers is the default and fast. --patience and --histogram often produce far more readable diffs when code blocks move or similar lines repeat: git diff --patience.

4. Word-level diffs for prose and config

git diff --word-diff shows exactly which words changed in a long line, ideal for Markdown and JSON.

5. Moved code detection

git diff --color-moved highlights relocated blocks so you don't re-review code that only moved.

6. Compare two arbitrary strings or files

You don't need a repo to diff two snippets. A browser-based Diff Checker is handy for comparing two API responses or config blobs, and because it runs locally, sensitive text never leaves your machine.

7. Structured data deserves structured diffs

For JSON, sort keys and pretty-print both sides first, otherwise key order creates fake differences.

Disclosure: I built WebDevToolbox, a free collection of 500+ browser-based dev tools.