Git Integration
Differens plugs into your normalgit diff workflow. Instead of line hunks, it reports the semantic changes: renames, moves, added parameters.
Install the driver
One command registers Differens as a git diff driver in your repo’s local config, then prints the.gitattributes lines you need to opt files in:
diff=differens lines to .gitattributes (repo root or per-directory) for every extension you want covered. Files without the attribute keep normal git diff output.
Now git diff on a .ts file shows the change instead of a hunk:
git diff, git diff --staged, and git difftool. To remove the driver later, unset the config. See the note in the git package reference.
Standalone modes
No git driver required.differens reads git directly.
Working tree
With no arguments,differens diffs the working tree against HEAD and correlates the changes across files:
git diff HEAD in semantic form. It picks up unstaged and staged changes. Untracked files are excluded.
Commit ranges
Two commits
Both arguments resolve as git refs, so two SHAs or branch names diff like a range:Two directories
If both arguments are directories, Differens walks each one and diffs matching relative paths:node_modules, dist, .git, …) are skipped. Files over 2 MiB are treated as whole-file additions or removals.