在.git / config中我尝试过:
[diff]
patience = true
但没有运气
我必须这样做:
git diff --patience
git show --patience HEAD
等,每一次?
答案 0 :(得分:88)
自Git 1.8.2以来,Git将使用diff.algorithm
:
git config --global diff.algorithm patience
花了几次迭代:
[PATCH v3 0/3] Rework git-diff algorithm selection
[PATCH v2 0/3] Rework git-diff algorithm selection
[PATCH 0/3] Rework git-diff algorithm selection
答案 1 :(得分:7)
代替基于配置的答案,您可以在.gitconfig
中设置别名,如下所示:
[alias]
dp = diff --patience
这将允许您执行git dp [optional refspec]