Question

On OSX, I'm using diffmerge as my git diffing tool. Here is my .gitconfig:

[diff]
        tool = diffmerge
[difftool "diffmerge"]
        cmd = diffmerge \"$LOCAL\" \"$REMOTE\"
[alias]
        d = difftool --no-prompt

If I just use git difftool it will prompt me for every single file I want to diff. To get around this, I created the git d alias and added the --no-prompt flag.

Is there any way I can prevent the repeated prompts without having the alias? I tried inserting prompt=false and prompt = NO under difftool, as well as moving the --no-prompt flag next to the diffmerge command, but none of these helped.

Was it helpful?

Solution

moving the --no-prompt flag next to the diffmerge command

--no-prompt is an argument of difftool (as I mention in "How do I view 'git diff' output with a visual diff program?").
So I confirm it won't work with diffmerge.

I tried inserting prompt=false and prompt = NO under difftool

under a [difftool] section directly, that should work (not under [difftool "diffmerge"])

You can see another approach here, based on wrappers: that can help to debug those commands.

git config --global difftool.diffmerge.cmd "diffmerge-diff.sh \"\$LOCAL\" \"\$REMOTE\"" \"\$BASE\"" \"\$MERGED\""
git config --global difftool.prompt false
git config --global diff.tool diffmerge
git difftool
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top