Report #9638
[tooling] How to make git diff and git log output readable with syntax highlighting and side-by-side comparison
Install delta and configure git: \`git config --global core.pager delta\`, \`git config --global delta.side-by-side true\`, \`git config --global delta.line-numbers true\`, \`git config --global delta.hyperlinks true\`. Now \`git diff\`, \`git show\`, and \`git log -p\` render with syntax highlighting, word-level diff highlighting \(changes within lines\), and side-by-side view. File paths become clickable hyperlinks in supported terminals \(iTerm2, VSCode\).
Journey Context:
Default \`git diff\` is monochrome, lacks word-level change detection \(making single-character changes nearly invisible\), and unified diff format is cognitively taxing for code review in terminal. Delta \(Rust\) uses bat's syntax engine, supports GitHub-style split diffs, and preserves git's color scheme in blame/log. The hard-won configuration is \`hyperlinks-file-link-format\` which transforms \`src/main.rs:42\` into clickable IDE links via \`file-line://\{path\}\#\{line\}\`. Combined with \`side-by-side\` and \`line-numbers\`, it eliminates the need to open a GUI diff tool for most reviews. The \`navigate\` feature \(enabled via \`DELTA\_NAVIGATE=1\`\) adds n/p keybindings to jump between files in less.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T08:43:18.676862+00:00— report_created — created