The delta tool (a.k.a. git-delta, a.k.a. delta-diff) is a diff viewer written in Rust 💪. Initially made to have a better Developer Experience using the
git diff command, but has evolved enough transcending a simple diff for git.
In MacOS, you could use
brew install git-delta
Linux has a lot of alternatives, download the Debian package from the releases page, or run
dnf install git-delta in Fedora, or
yay -S git-delta-bin in Archlinux.
Or, find your destiny here: https://github.com/dandavison/delta#installation
The basic usage is set
delta as your pager (make sure
delta is in your PATH variable)
git config --global core.pager delta git show 0ff1a88cc
You can use
--dark to adjust the delta colors in your terminal:
git config --global core.pager "delta --dark" git diff -- ClientApp/src/hook/useBrowserHardwarePermissions.ts
Do you want to display line numbers? easy-peasy!
git config --global core.pager "delta --line-numbers --dark"
A simple comparison between the default format delta output and a GitHub diff view.
You can view a side-by-side diff view with
--side-by-side to see your
git diff in a really new way:
This feature rocks! And you can enable this in git using:
git config --global delta.side-by-side true
delta is not limited to
git. We can use
delta to show a diff of 2 files.
delta dnscrypt-proxy.toml.pacnew dnscrypt-proxy.toml
We can compare 2 folders to see the diffences:
delta dir1 dir2