Git: How configure KDiff3 as merge tool and diff tool

前端 未结 7 1061
长情又很酷
长情又很酷 2020-11-28 17:25

Recently I was using GitExtension 2.46, but the Git version that has the same is 1.9.4.msysgit.2. Willing to use only Git commands, I uninstalled GitExtension and install th

相关标签:
7条回答
  • 2020-11-28 18:16

    These sites were very helpful, almost, mergetool and difftool. I used the global configuration, but can be used by repository without problems. You just need to execute the following commands:

    git config --global merge.tool kdiff3
    git config --global mergetool.kdiff3.path "C:/Program Files/KDiff3/kdiff3.exe"
    git config --global mergetool.kdiff3.trustExitCode false
    
    git config --global diff.guitool kdiff3
    git config --global difftool.kdiff3.path "C:/Program Files/KDiff3/kdiff3.exe"
    git config --global difftool.kdiff3.trustExitCode false
    

    The use of the trustExitCode option depends on what you want to do when diff tool returns. From documentation:

    git-difftool invokes a diff tool individually on each file. Errors reported by the diff tool are ignored by default. Use --trust-exit-code to make git-difftool exit when an invoked diff tool returns a non-zero exit code.

    0 讨论(0)
提交回复
热议问题