canpolat@programming.devM to Git@programming.devEnglish · 1 month agodeff: interactive, side-by-side file review for git diffsgithub.comexternal-linkmessage-square3fedilinkarrow-up112arrow-down10
arrow-up112arrow-down1external-linkdeff: interactive, side-by-side file review for git diffsgithub.comcanpolat@programming.devM to Git@programming.devEnglish · 1 month agomessage-square3fedilink
minus-squareBB_C@programming.devlinkfedilinkarrow-up4·1 month agoOne 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.
One can use custom viewers via
core.pagerandinteractive.diffFilterin git configuration, not to mention defining customdifftools 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-ssomewhere 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-sAnd the you can just
git difftool --tool d-sbs HEAD~You can further create an alias for that too of course.