this post was submitted on 26 Feb 2026
12 points (100.0% liked)

Git

4568 readers
8 users here now

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Resources

Rules

  1. Follow programming.dev rules
  2. Be excellent to each other, no hostility towards users for any reason
  3. No spam of tools/companies/advertisements. It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.

Git Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.

founded 2 years ago
MODERATORS
top 3 comments
sorted by: hot top controversial new old
[–] BB_C@programming.dev 4 points 1 day ago

One can use custom viewers via core.pager and interactive.diffFilter in git configuration, not to mention defining custom difftools directly.

I primarily use delta for this (sometimes packaged as git-delta), which itself is implemented in Rust too.

For example, save this as a script called delta-s somewhere in $PATH:

#!/bin/bash

delta -s \
  --minus-style='syntax #400000' \
  --plus-style='syntax #004000' \
  --minus-emph-style='normal #a00000' \
  --plus-emph-style='normal #00a000' \
  --line-buffer-size=48 \
  --max-line-distance=0.8 $@

Then, in ~/.gitconfig, add

[difftool "d-sbs"]
  cmd = diff -u $LOCAL $REMOTE | delta-s

And the you can just

git difftool --tool d-sbs HEAD~

You can further create an alias for that too of course.

[–] 7uWqKj@lemmy.world 5 points 1 day ago (1 children)
[–] EarMaster@lemmy.world 2 points 1 day ago

The script is linked and is only 33 lines long. The instructions are also written down later in the Readme.