Git: How configure KDiff3 as merge tool and diff tool

前端 未结 7 1086
长情又很酷
长情又很酷 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 17:55

    To amend kris' answer, starting with Git 2.20 (Q4 2018), the proper command for git mergetool will be

    git config --global merge.guitool kdiff3 
    

    That is because "git mergetool" learned to take the "--[no-]gui" option, just like "git difftool" does.

    See commit c217b93, commit 57ba181, commit 063f2bd (24 Oct 2018) by Denton Liu (Denton-L).
    (Merged by Junio C Hamano -- gitster -- in commit 87c15d1, 30 Oct 2018)

    mergetool: accept -g/--[no-]gui as arguments

    In line with how difftool accepts a -g/--[no-]gui option, make mergetool accept the same option in order to use the merge.guitool variable to find the default mergetool instead of merge.tool.

提交回复
热议问题