gpt4 book ai didi

git - `git config interactive.diffFilter diff-highlight` : the same diff by lines - and without color

转载 作者:行者123 更新时间:2023-12-03 14:43:44 24 4
gpt4 key购买 nike

git config --global interactive.diffFilter diff-highlight我的 .gitconfig :

# This is Git's per-user configuration file.
[user]
name = Vitaly Zdanevich
email = vitaly.zdanevich@xxx.com
[core]
excludesfile = /Users/vitaly/.gitignore_global
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge --skip -- %f
process = git-lfs filter-process --skip
required = true
[diff]
tool = vimdiff
context = 20
[difftool]
prompt = false
[interactive]
diffFilter = diff-highlight

但在 git commit -pgit add -p我逐行看到相同的差异 无色默认 terminal.app :

git config interactive.diffFilter diff-highlight git diff without color

我也试过:
git -c interactive.diffFilter="git diff --color-words" add -p
并得到:
fatal: mismatched output from interactive.diffFilter
hint: Your filter must maintain a one-to-one correspondence
hint: between its input and output lines.

我的 git 版本是 2.17.2 (Apple Git-113)macOS 10.14.1来自官方的命令行工具,我更喜欢简单而不是 Brew。

最佳答案

看起来像是用新的 git 版本 (2.26.2) 修复的

git diff-highlight

关于git - `git config interactive.diffFilter diff-highlight` : the same diff by lines - and without color,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53213708/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com