Replace visual studio 2012 Diff tool with winmerge when using Microsoft Git Provider
Asked Answered
G

1

9

I have a Visual Studio 2012 v3 and git extensions installed.

I want to change the default merge tool to winmerge but it seems that this is not a trivial task when Microsoft Git Provider is chosen.

When i go to VS -> Tools -> Options -> Source Control I have only Plug-in-Selection tab and cannot choose configure tools to change to WinMerge.

Screenshot

Is there any way of using Git Extensions with WinMerge inside VS2012?

Germann answered 25/7, 2013 at 18:25 Comment(1)
Note also that Git Extensions are not the Microsoft Visual Studio Tools for Git, they are two different technologies.Delastre
L
14

Backed up by that DZone-article, the trick is to configure the diff-tool in git.config:

  1. Open the git bash in your repository
  2. Create a config section for WinMerge as a diff-tool:

    $ git config --local difftool.winmerge.cmd '"C:\Program Files (x86)\WinMerge\WinMergeU.exe" "$LOCAL" "$REMOTE"'
    
  3. Configure git to switch to WinMerge as the diff-tool:

    $ git config --local diff.tool winmerge
    

If you want to have this setting as a global setting, replace the --local switch with --global.

Logan answered 31/7, 2013 at 21:29 Comment(4)
I think you mean replace --local with --global.Breathtaking
@TheMouthofaCow Thank you for the hint - you're right of course. Edited my response accordingly.Logan
It works for kdiff3 as well. Just replace winmerge with kdiff3.Pompom
What is "difftool.winmerge.cmd"? Is it a file from winmerge?Tomblin

© 2022 - 2024 — McMap. All rights reserved.