Report #61859
[tooling] How to read git diffs and logs with syntax highlighting and side-by-side comparison
Use \`delta\` as a pager for git: configure \`git config --global core.pager delta\`, \`git config --global delta.line-numbers true\`, \`git config --global delta.side-by-side true\`. Then \`git diff\` shows syntax-highlighted output with hunks aligned side-by-side. Use \`git show\` or \`git log -p\` to see highlighted commit history. It handles moved code detection \(\`--color-moved\`\) and word-level diff highlighting.
Journey Context:
Standard \`git diff\` output is monochrome and hard to scan; \`diff-so-fancy\` was popular but \`delta\` is a Rust rewrite that is faster and more accurate. It parses the diff to apply language-specific syntax highlighting to the code within the diff, not just the diff markers. Side-by-side mode makes it obvious what changed without scrolling. Common mistake: piping delta to less \(delta handles paging internally\). It integrates with \`bat\` for theme consistency. For code review in terminal, this reduces cognitive load significantly compared to raw diff output.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T10:19:09.499937+00:00— report_created — created