git - 如何抑制确认 "Launch ' $difftool' [Y/n] :"iff (if and only if) a specific file is passed to git difftool?

标签 git

<分区>

当使用 git difftool merge 分支或查看修订版的所有更改时,在每次调用之前询问 Launch '$difftool' [Y/n]: 可能是有意义的该工具的功能,以便使用 SIGINT 中断长长的调用链。当一个特定的文件作为参数传递时,它不会,AFAIK。如何仅在后一种情况下抑制该问题(因为在前一种情况下问它是有意义的)?

我在 Ubuntu 14.10 上使用 2.1.0。

编辑:看到Why does "git difftool" not open the tool directly?之后我修改了这个问题,以便弄清楚如何处理这样一个事实,即询问是否有多个文件需要比较是有意义的。

最佳答案

我从 Stack Overflow 本身找到了以下内容:

 man git-difftool

OPTIONS
   -y, --no-prompt
       Do not prompt before launching a diff tool.

或者在全局配置中自行设置:

git config --global --add difftool.prompt false

Why does "git difftool" not open the tool directly?

关于git - 如何抑制确认 "Launch ' $difftool' [Y/n] :"iff (if and only if) a specific file is passed to git difftool?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26742525/

相关文章:

git - 如何让 Git 暂时忽略 ~/.gitconfig?

git - 按最后修改日期的顺序列出文件

git 告诉我所有的文件在添加和暂存后都是新的

node.js - 由于 "phantom"文件而无法切换分支

git - 使用 Git (Bitbucket) 拒绝 Dockerfile 公钥权限

git - 我可以通过索引内容覆盖工作副本吗?

git - 更新被拒绝,因为远程包含您在本地没有的工作

git - Azure管道: CI Build running after merging pull request source branchname?

GIT 不会从远程 pull 最新的更改

git - 为什么 git 不理解我的文件夹 move 操作?