diff -u a.txt b.txt | delta.įor Mercurial, you can add delta, with its command line options, to the section of. Here's an example:ĭelta also handles unified diff format, e.g. The most convenient way to configure delta is with a section in ~/.gitconfig.
It's important to have a reasonably recent version of less installed.
Best diff tool git install#
10.11 El Capitan) should install using Homebrew, Cargo, or MacPorts: the binaries on the release page will not work.īehind the scenes, delta uses less for paging. IMPORTANT: If you are using Ubuntu <= 19.10 or are mixing apt sources, read #504, be extremely cautious, and try the versions linked against musl. Here is a quick sumary for selected package managers: Arch Linux Note that the package is often called git-delta, but the executable installed is called delta. You can download an executable for your system:Īlternatively you can install delta using a package manager: see /git-delta. In addition, delta handles traditional unified diff output. Matching of unequal numbers of changed lines Multiple insertion/deletions detected per line Commit hashes can be formatted as terminal hyperlinks to the GitHub/GitLab/Bitbucket page ( -hyperlinks).įile paths can also be formatted as hyperlinks for opening in your OS.n and N keybindings to move between files in large diffs, and between diffs in log -p views ( -navigate).
Best diff tool git code#
Code can be copied directly from the diff ( -/+ markers are removed by default).Customizable git blame with syntax highlighting ( -hyperlinks formats commits as links to GitHub/GitLab/Bitbucket etc).Support for Git's -color-moved feature.Stylable box/line decorations to draw attention to commit, file and hunk header sections.diff-highlight and diff-so-fancy emulation modes.Handles grep output with file paths from rg, git grep, grep, etc.Git style strings (foreground color, background color, font attributes) are supported for >20 stylable elements.Within-line highlights based on a Levenshtein edit inference algorithm.Language syntax highlighting with color themes.Here's what git show can look like with git configured to use delta:Īll the syntax-highlighting color themes that are available with bat are available with delta: diff-highlight and diff-so-fancy emulation.Delta aims to make this both efficient and enjoyable: it allows you to make extensive changes to the layout and styling of diffs, as well as allowing you to stay arbitrarily close to the default git/diff output.ĭelta with side-by-side and line-numbers activated Navigate = true A syntax-highlighting pager for git, diff, and grep outputĬode evolves, and we all spend time studying diffs.