macos - `git difftool -d` 在 mac 上获取 'file does not exist' 错误

标签 macos git filemerge

我正在尝试使用命令 git difftool -d 来比较文件夹。

命令获取差异列表成功(显示在 FileMerge.app 中)。但是当我尝试打开每个差异文件时。我收到 file does not exist 错误。

输出日志:

$ git difftool -d 
merge tool candidates: opendiff kdiff3 tkdiff xxdiff meld kompare gvimdiff diffuse ecmerge p4merge araxis bc3 codecompare emerge vimdiff

图片:

 ng image

我在 mac OS X 10.9 上使用 git 版本 1.8.1.1。 谢谢。

最佳答案

问题是 opendiff 命令返回导致 difftool 删除临时目录和您正在比较的所有文件。经过大量搜索后我发现了这一点,基本上你必须保持 opendiff 运行直到 FileMerge 退出。 将您的 git 配置更改为:

[diff]
    tool = opendiff
[difftool]
    prompt = false
[difftool "opendiff"]
    cmd = /usr/bin/opendiff \"$LOCAL\" \"$REMOTE\" -merge \"$MERGED\" | cat

在这里找到了答案: https://gist.github.com/bkeating/329690

关于macos - `git difftool -d` 在 mac 上获取 'file does not exist' 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20491532/

相关文章:

Xcode 4.3.2不会在调试器中显示完整的调用程序堆栈,而仅显示当前功能?

git pull --rebase 用于特定文件夹/文件

git - Github 操作中的 git remote add 权限被拒绝

macos - 如何使用 git mergetool 的 filemerge

ruby - 安装 byebug gem 时出错

python - 如何在 Mac OS X 10.6 上将 virtualenv 与 Google App Engine SDK 一起使用

git - 如何 merge 两个不相关的 git 存储库,保留历史

xcode - 如何在 Mac OS 10.13+ 和 Xcode 9+ 上打开 FileMerge.app?

linux - 适用于 Linux 的 solaris filemerge 和 pstack 等价物

Mac 上的 Python Multiprocessing Pool.map() 串行而不是并行运行进程