A two color illustration of an old radio with two knobs and a dial in red and black surrounded in a red halftone pattern. The dial goes back and forth when hovered.

Git Diff for Diffing

It blew my mind when I learned Git can be used to compare files or directories even if they aren’t in Git. No more diff for me. Combine it with delta or diff-so-fancy, and you’re having quite the diff party.

Terminal window
git diff --no-index cat-profile.md another-cat-profile.md

It’s incredibly useful. For example, I wanted to compare the bundled CSS after a Node upgrade to ensure nothing changed in the output.

Terminal window
git diff --no-index dist/css pre-upgrade-dist/css