Setting up WinMerge as Diff tool for Visual Studio 2019 for Git
Asked Answered
M

1

5

First what I found is that for to change diff tool used in Team Explorer in VS I don't have settings in VS, I need to edit .gitconfig? [EDIT] Is it possible that using portable version of WinMerge caused some problem?

So step 1:

git config --global --edit

Add values:

[diff]
    tool = winmerge
[difftool "winmerge"]
    cmd = "'C:/PortableApps/PortableApps/WinMergePortable/WinMergePortable.exe'" -e "$LOCAL" "$REMOTE"
[difftool]
    prompt = false

And that really starts WinMerge as diff tool, but I get following error: Both paths are invalid!

Both paths are invalid!, and they really are because folder: C:\Users\andri\AppData\Local\Temp\TFSTemp is empty.

What did I do wrong?

Marielamariele answered 6/4, 2020 at 20:59 Comment(0)
M
6

Tried several answers and finally got it working, it seams that few more arguments were required to get it working:

[diff]
    tool = winmerge
[difftool "winmerge"]
    cmd = "'C:/PortableApps/PortableApps/WinMergePortable/WinMergePortable.exe'" -e -u -dl "Original" -dr "Modified" \"$LOCAL\" \"$REMOTE\"
[difftool]
    prompt = false
Marielamariele answered 7/4, 2020 at 13:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.