How to skip "Hit return to start merge resolution tool" and open mergetool automatically

erkfel picture erkfel · Aug 23, 2013 · Viewed 7.1k times · Source

Git asking to hit return button to open the mergetool for each conflict file one by one:

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

How can I avoid the hitting return step for my project and just open the configured merge tool automatically?

Answer

John Mellor picture John Mellor · Jun 4, 2014

To permanently skip the prompt, run:

git config --global mergetool.prompt false

To skip it for a single run of git mergetool, pass -y or --no-prompt:

git mergetool -y