我使用一个名为diffr的另类diff工具,如下所示:
diffr="diffr \
--colors removed:background:00:foreground:01 \
--colors refine-removed:background:0:foreground:124 \
--colors added:background:0:foreground:10 \
--colors refine-added:background:0:foreground:35:intense \
| less -R"
git config --global pager.diff "$diffr"
git config --global pager.show "$diffr"
git config --global pager.log "$diffr"
我的普通工作流程在添加和签出代码时通常也使用--patch
和--interactive
标志。
但是,该--patch
开关似乎使用默认值(colordiff?),而不使用diffr。
在这种情况下(以及其他我可能没有想到的其他工具),我如何强制将diffr作为差异工具?
有时,找到答案所需要做的就是问问题。
解决方案是:
git config --global interactive.diffFilter "$diffr"
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句