Reputation: 10911
When using VS, if I do a comparison on a non-text file when comparing to the previous one, VS just says that One or both of these files are not text files and cannot be opened in the comparison window. ... The contents of the two files are different.
I've setup my git environment so that it uses specific scripts when comparing images, but how do I get VS to either respect that or specify some other method for telling VS to use my scripts?
Upvotes: 0
Views: 626
Reputation: 10911
Should or does? I've not used the git difftool yet, but I have setup git diff. Wasn't sure of the difference between the two.
Upvotes: 0
Reputation: 31
Git allows you to configure both a "merge tool" and a "diff tool" via it's config files (local repo-specific config at [your repo]/.git/config and global at c:\users[youruser].gitconfig).
For example here is the relevant section of my config
[diff]
tool = bc3
[difftool "bc3"]
path = C:\\Program Files\\Beyond Compare 4\\BCompare.exe
[merge]
tool = bc3
[mergetool "bc3"]
path = C:\\Program Files\\Beyond Compare 4\\BCompare.exe
You can find the git config documentation here. Note that there are some tools that are supported "out of the box". If you use one of those you don't have to provide a custom path to the executable like I have above.
Once you have configured your diff/merge tools VS should respect these settings and launch the diff in your tool of choice.
Upvotes: 1