Got most of the way there with this post on StackOverflow. Figured out the rest and tried to edit the answer to show what I'd learned. No dice. My edit was rejected. QQ I guess I'll just add another answer later.

(Aside: Not sure I dig the edit police on stackoverflow. For some reason I figured the original author would be notified and allowed to choose, which makes more sense to me. I mean, I know that the edit isn't, "incorrect or an attempt to reply to or comment on the existing post", but I'm still unable to share what I learned to make things work with others. I don't care about the 2 points of rep for an edit; I want others (including myself) to be able to find the answer more quickly.)

Anyhow, here's the info I'd need to redo what I did, put in a place where at least I can find it again easily...

Here is an example of how this might look in a .gitconfig after those three calls. Alternatively, you can edit the .gitconfig directly.

[merge]
tool = winmerge
[mergetool "winmerge"]
cmd = "wmDiff.sh \"$LOCAL\" \"$REMOTE\""
trustExitCode = false
keepBackup = false
[mergetool]
prompt = false


Then, making sure WinMerge's folder was in my box's PATH variable (go to the cmd line and check echo %PATH% to double-check), I inserted a file called wmDiff.sh into the WinMerge folder.

#!/bin/sh
echo Launching WinMergeU.exe: $1 $2
"C:/Program Files (x86)/WinMerge/WinMergeU.exe" -e -ub "$1" "$2"


Then I got my Git for Windows bash prompt, typed git mergetool after attempting a git merge branchName that had conflicts, and nothing happened. Because I'm an idiot. Close that window, since when it opened and read .gitconfig those lines weren't there, open a new Git bash window, and knock yourself out.

Labels: , ,