How to use Winmerge with Git Extensions?

前端 未结 5 1150
盖世英雄少女心
盖世英雄少女心 2020-12-07 11:04

I\'m using Git Extensions and it pre-installs and sets up KDiff as the diff tool to solve merge conflicts. I\'m very fond of Winmerge though and would like to replace KDiff

5条回答
  •  生来不讨喜
    2020-12-07 11:59

    Add or change the following in the config file:

    [merge]
        tool = winmerge
    [mergetool "winmerge"]
        cmd = $PROGRAMFILES/WinMerge/WinMergeU.exe "$PWD/$MERGED"
    

    This solution is distinct in two ways:

    1. Simply calls WinMergeU.exe *conflictfile*, while the two-sided calls suffer from the fact that left hand window presents <<<<<<<, =======, and >>>>>>> markers that $MERGED contains.
    2. Apply mergetool on per-repo basis - I am editing the $GIT_DIR/config file . Same result could be achieved by calling git config without --system or --global argument. This is to note that there are a few scopes of configuration to choose from.

    The $PROGRAMFILES variable is maintained by git bash and (unlike the similar variable on native windows cmd) it navigates to "Program Files (x86)".

提交回复
热议问题