use Winmerge inside of Git to file diff

前端 未结 8 1109
清酒与你
清酒与你 2020-11-27 09:34

Is there a way to use Winmerge inside of git to do Diffs?

8条回答
  •  独厮守ぢ
    2020-11-27 10:00

    I faced trouble using the first part in 2 places and fixed it as follows

    1. The second command for setting up winmerge.cmd required an extra slash on cmdline (before $LOCAL and $REMOTE), else cygwin was substituting the variable in cmdline

      C:\myGitRepo>git config --replace --global difftool.winmerge.cmd "winmerge.sh \"\$LOCAL\" \"\$REMOTE\""
      
    2. changed the winmerge.sh file to (without this, was getting right-path-invalid error)

      #!/bin/sh
      echo Launching WinMergeU.exe: "$(cygpath -aw "$1")" "$(cygpath -aw "$2")"
      "$PROGRAMFILES/WinMerge/WinMergeU.exe" -e -ub -dl "Base" -dr "Mine" "$(cygpath -aw "$1")" "$(cygpath -aw "$2")"
      

提交回复
热议问题