我知道最新的 git 可以使用这个命令来目录区分两个版本:
git difftool -d <sha1> <sha1>
但是我找不到任何可以完成这项工作的 git 客户端(GUI)。
我试过了
tortoisegit
smartgit
git-cola
git-extentions
github
gitk
他们都没有这个功能,谁能推荐任何可以做到这一点的 git 客户端(在 windows xp 上运行)?
我不知道sourcetree
能不能做这个,因为我既没有 win7 也没有 mac。
谢谢。
最佳答案
标准的 Windows git 客户端,msysgit , 如果您将其配置为使用 Beyond Compare 3 则可以执行此操作(不是免费的)作为 diff 工具。
可以设置like this :
git config --global diff.tool bc3
git config --global difftool.bc3.cmd "\"c:/Program Files/Beyond Compare 3/BCompare.exe\" \"$LOCAL\" \"$REMOTE\""
git config --global difftool.prompt false
编辑: 实际上 kdiff3 也这样做,而且是免费的。 Setup here :
[diff]
tool = kdiff3
[merge]
tool = kdiff3
[mergetool "kdiff3"]
path = C:/YourPathToBinaryHere/KDiff3/kdiff3.exe
keepBackup = false
trustExitCode = false
[difftool "kdiff3"]
path = C:/YourPathToBinaryHere/KDiff3/kdiff3.exe
keepBackup = false
trustExitCode = false
关于可以做目录差异的 git 客户端,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15705313/