如何使用winmerge作为Linux上安装的git的merge / diff工具

时间:2016-01-13 15:39:36

标签: git winmerge git-difftool

$ cd testGit/
$ ls
first.txt  second.txt
$ git log --oneline
9c88fb7 add second lines to 1st & 2nd files
9c3da6c add 1st & 2nd files

$ git diff 9c88fb7 9c3da6c first.txt
warning: LF will be replaced by CRLF in first.txt.
The file will have its original line endings in your working directory.
diff --git a/first.txt b/first.txt
index 4a0143f..9c59e24 100644
--- a/first.txt
+++ b/first.txt
@@ -1,2 +1 @@
 first
-first2

$ git difftool HEAD HEAD~1
/git/2.5.3/git-core/mergetools/winmerge: line 124: /c/Program Files (x86)/WinMerge/WinMergeU.exe: No such file or directory
/git/2.5.3/git-core/mergetools/winmerge: line 124: /c/Program Files (x86)/WinMerge/WinMergeU.exe: No such file or directory

我已将redhat驱动器安装到Z:/ testGit /.

问题我可以使用winmerge对两个提交进行比较(即9c88fb7 9c3da6c)吗?

1 个答案:

答案 0 :(得分:1)

WinMerge是为Windows开发的。

From their site

  

WinMerge是适用于Windows的开源差异和合并工具。

此外:

  

支持Microsoft Windows 2000 / XP / 2003 / Vista / 2008/7/8/2013

这是一个网站,其中包含指向Linux的替代差异工具的链接: http://www.linuxalt.com/linux-alternatives-to/windows/winmerge.html