I've set the external merge tool to be WinMerge, and I've also tried using the Custom option and pointing it to the exe-file, but I'm having trouble launching either, and I can't find any information on what the custom option needs to work.
When trying to launch external merge tool, a window pops up and disappears really quickly, and no application starts.
You can only use WinMerge as an external diff tool, not as an external merge tool (that's why it's not in the list of merge tools).
Ironically despite its name, WinMerge is not a proper merge tool, it only does 2-way comparisons rather than the 3-way merge that Git uses.
I guess I need to look into 3-way merge more that Steve Streetling mentions but I have setup WinMerge as an external tool. Here are the settings needed. It sets the display so your local file is on the right site.
The setting location: Tools->Options->Diff
External Diff Tool: Custom
Diff Command: C:\Program Files (x86)\WinMerge\WinMergeU.exe
Arguments: $LOCAL $REMOTE
External Merge Tool: Custom
Merge Command: C:\Program Files (x86)\WinMerge\WinMergeU.exe
Arguments: /w1 $LOCAL $REMOTE $MERGED
Update: WinMerge can now do 3 files. So now you can include the base file.
External Diff Tool: WinMerge
Diff Command: C:\Program Files\WinMerge\WinMergeU.exe
Arguments: -wl -dl PreviousVersion -dr Local \"$LOCAL\" \"$REMOTE\"
External Merge Tool: WinMerge
Merge Command: C:\Program Files\WinMerge\WinMergeU.exe
Arguments: -wl -wm -dl PreviousVersion -dm Base -dr Local $LOCAL $BASE $REMOTE -o $MERGED
To explain the arguments:
"-wl" makes left file ($Remote) read only so you don't accidentally start editing the wrong file.
"-wm" read only for the middle ($Base) file
"-dl PreviousVersion" Naming the $Remote file "PreviousVersion"
"-dm Base" Naming the $Base file "Base"
"-dr Local" Naming the $Local file "Local"
"-o" sets up $Merged as the output file as your result of the merge.
@Shawn_Murphy Thank you very much for sharing these settings, but I found that there were some parts of your merge arguments that could be improved upon:
Please correct me if I am wrong.
This results in the following arguments for merge:
-wl -wr -dl Remote -dm Base -dr Local \"$LOCAL\" \"$BASE\" \"$REMOTE\" -o \"$MERGED\"
Even though that should be the right behavior, it isn't. It appears that winmerge reverses the order of the files in the application panels. Below my command line
-e -u -x -wr -wl -dl \"Local - \"$MERGED\"\" -dm Base -dr \"Remote - \"$LOCAL\"\" \"$REMOTE\" \"$BASE\" \"$LOCAL\" -o \"$MERGED\"
@Couru D_avance I have done a test with winmerge 184.108.40.206 where I have written three files: remote.txt, base.txt and local.txt. I have written in the files the name of the file.
Then you can easy see what is happen.
Question to your command line:
Why do you add $MERGED to the title of the left side? This side is read only.
Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events