Using "git diff" during conflict resolution phase (i.e. after a conflict in a merge attempt) ignores configured editor

47 Views Asked by At

Using the below configuration,

[diff]
tool = vimdiff

[difftool]

[difftool "vimdiff"]
cmd = "$EDITOR -d \"$LOCAL\" \"$REMOTE\"; sleep 1"

and using "git diff" during a merge conflict (I specifically don't use "git merge" here), not the specified difftool (vimdiff), but the built-in diff is used (which gives me a patch-like display). When using "git diff" (the very same command) when not in a merge conflict, "vimdiff" is used as expected.

Is this behavior built-in, and can it be overridden?

1

There are 1 best solutions below

0
Paul Mahardika On

i think you can try this to change the editor.

$ git config --global diff.tool vscode
$ git config --global difftool.vscode.cmd 'code --wait --diff $LOCAL $REMOTE'