如何跳过"点击返回以启动合并解析工具"并自动打开mergetool

erk*_*fel 6 git mergetool git-config

Git要求点击返回按钮逐个打开每个冲突文件的mergetool:

> git mergetool 
Normal merge conflict for '...':
  {local}: modified file
  {remote}: modified file
Hit return to start merge resolution tool (opendiff):
Run Code Online (Sandbox Code Playgroud)

如何避免项目的命中返回步骤并自动打开配置的合并工具?

Joh*_*lor 11

要永久跳过提示,请运行:

git config --global mergetool.prompt false
Run Code Online (Sandbox Code Playgroud)

要跳过它一次git mergetool,传递-y--no-prompt:

git mergetool -y
Run Code Online (Sandbox Code Playgroud)


Car*_*rum 8

使用-y标志.从文档:

-y
--no-prompt
在每次调用合并解析程序之前不要提示.