extensions中为特定文件扩展名设置diff

extensions中为特定文件扩展名设置diff

本文介绍了是否可以在git-extensions中为特定文件扩展名设置diff/merge-tool?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我才刚刚开始在LabView中进行开发,这对我来说是全新的.

I'm just getting started on developing in LabView, it's all new to me.

我想使用git扩展来处理我的版本控制.由于源采用*.vi格式,因此我无法使用常规的diff工具,因此源为二进制.

And i'd like to use git extensions to handle my versioning. Since the source is in a *.vi format, I can't use the normal diff tools, the source is binary.

幸运的是,LabView带有专用的差异和合并工具,这似乎非常有用.而且我可以设置TortoiseGit在所有* .vi文件上使用这些工具.这是从以下方法开始的:

Fortunately, LabView comes with dedicated diff and merge tools which seems to be very helpful. And I can setup TortoiseGit to use these tools on all *.vi files. It's from this how-to:

https://www.labviewhacker.com/doku. php?id = learn:software:github:getting_started

在Git Extensions中有没有办法做同样的事情?与TortoiseGit相比,我更喜欢git扩展..因此,我宁可不要被迫使用TortoiseGit.

Is there a way to do the same in Git Extensions? I much prefer git extensions over TortoiseGit.. So I'd rather not be forced to use TortoiseGit.

根据我发现的情况,您只能指定常规的差异/合并工具,而不能为不同类型的文件指定不同的工具.

From what I've found, you can only specify a general diff/merge tool, not different ones for different types of files.

任何帮助将不胜感激,有人知道怎么做吗? :)

Any help would be appreciated, do anyone know how? :)

推荐答案

如果差异工具的输出是文本,则可以使用.gitattributes.git/config的组合在标准Git下查看差异.我希望Git Extensions会尊重此设置.

If the output of the diff tool is text, you can view diffs under standard Git using a combination of .gitattributes and .git/config. I hope that Git Extensions would respect this setting.

我建议阅读Pro Git的 Git属性一章本书以获取有关设置的详细信息,但该想法应类似于

I recommend reading the Git Attributes chapter of the Pro Git book for details on setting this up, but the idea should be something like

*.vi diff=labview

位于存储库的.gitattributes文件中,并且

in your repository's .gitattributes file, and

[diff "labview"]
textconv = labview-diff-tool

在您的.git/config中.

如果差异工具未输出文本,您可能会发现对很有用,它讨论了如何使用图形化差异工具.

If the diff tool does not output text, you may find the top response to this question useful, which discusses using a graphical diff tool.

这篇关于是否可以在git-extensions中为特定文件扩展名设置diff/merge-tool?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 19:50