use Winmerge inside of Git to file diff

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

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

8条回答
  •  无人及你
    2020-11-27 09:55

    On windows you can do it this way:

    1) Open .gitconfig file. It's located at your home directory: c:\users\username.gitconfig

    2) Add the lines below. Pay attention to the single quotes wrapping the path to winmerge:

    [diff]
        tool = winmerge
    [difftool "winmerge"]
        cmd = "'C:/Program Files (x86)/WinMerge/WinMergeU.exe'" -e "$LOCAL" "$REMOTE"
    [difftool]
        prompt = false
    [merge]
        tool = winmerge
    [mergetool "winmerge"]
        cmd = "'C:/Program Files (x86)/WinMerge/WinMergeU.exe'" \"$MERGED\" \"$REMOTE\"
    [mergetool]
        keepBackup = false
        trustExitCode = false
    

提交回复
热议问题