bat --diff file.js

Category: Web App Development

bat --diff file.js

Show only the changed lines of a file

Displays file.js with just the lines added, removed or modified versus the git index, styled like a diff. The --diff flag highlights the changes bat detects in the repository. Pipe the file in to diff against anything else.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.