使用Git的Visual Studio 2015无法比较文件 [英] Visual Studio 2015 using Git unable to compare files

查看:752
本文介绍了使用Git的Visual Studio 2015无法比较文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的项目中对一个文件运行diff应该是一个简单的任务,当我选择Compare with Unmodified时,出现错误:

源代码管理 - Git
无法启动配置的比较工具。



我查看了由VS2015自动生成的.gitconfig文件,

  [合并] 
工具= vsdiffmerge
[diff ]
tool = vsdiffmerge
[core]
editor = \C:/ Program Files(x86)/GitExtensions/GitExtensions.exe\fileeditor
autocrlf = true
[certificate]
[filterlfs]
clean = git-lfs clean%f
smudge = git-lfs smudge%f
required = true
[difftool]
prompt = false
[difftoolvsdiffmerge]
cmd = \C:\\程序文件(x86)\\ Microsoft Visual Studio 14.0 \\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \$ REMOTE\// t
[difftoolvsdiffmerge]
keepbackup = false
[mergetool]
prompt = false
[mergetool] vsdiffmerge]
cmd = \C:\\程序文件(x86)\\ Microsoft Visual Studio 14.0 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \$ REMOTE \\$ LOCAL \\$ BASE \\$ MERGED \// m
trustexitcode = true

有什么想法?

解决方案

卸载机器上所有版本的Git并重新安装所需的版本。似乎为我工作。


I wanted to run a diff on a file in my project which should be a simple task, and when I select Compare with Unmodified, I get the error:

Source Control - Git Failed to start the configured compare tool.

I've looked at the .gitconfig file that was auto generated by VS2015 and as far as I can tell there is nothing wrong with it.

[merge]
    tool = vsdiffmerge
[diff]
    tool = vsdiffmerge
[core]
    editor = \"C:/Program Files (x86)/GitExtensions/GitExtensions.exe\" fileeditor
    autocrlf = true
[credential]
[filter "lfs"]
    clean = git-lfs clean %f
    smudge = git-lfs smudge %f
    required = true
[difftool]
    prompt = false
[difftool "vsdiffmerge"]
    cmd = \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\vsdiffmerge.exe\" \"$LOCAL\" \"$REMOTE\" //t
[difftool "vsdiffmerge"]
    keepbackup = false
[mergetool]
    prompt = false
[mergetool "vsdiffmerge"]
    cmd = \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\vsdiffmerge.exe\" \"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\" //m
trustexitcode = true

Any thoughts?

解决方案

Uninstall all versions of Git on the machine and reinstall the version needed. Seemed to work for me.

这篇关于使用Git的Visual Studio 2015无法比较文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆