Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在处理一些我想防止被合并的非常尴尬的 XML 文件。我知道我可以使用-diff.gitattributes 中的标记来做到这一点。但是,如果可能的话,我仍然希望能够读取 gitk 中的差异。
-diff
有没有一种简单的方法可以做到这一点?
所以看起来这是不可能的,因为-diff首先使用标记有点麻烦,以阻止 git 尝试进行合并(而不是实际上想要阻止差异本身)
但是,解决方法是使用外部差异程序,例如 KDiff3。