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.
git diff --no-index cat-profile.md another-cat-profile.mdIt’s incredibly useful. For example, I wanted to compare the bundled CSS after a Node upgrade to ensure nothing changed in the output.
git diff --no-index dist/css pre-upgrade-dist/css