How do I view 'git diff' output with my preferred diff tool/ viewer?

后端 未结 26 1878
清酒与你
清酒与你 2020-11-22 03:20

When I type git diff, I want to view the output with my visual diff tool of choice (SourceGear \"diffmerge\" on Windows). How do I configure git to do this?

26条回答
  •  别跟我提以往
    2020-11-22 04:00

    Since git version 1.6.3 there is "git difftool" which you can configure to use your favorite graphical diff tool. Currently supported out-of-the-box are kdiff3, kompare, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge, diffuse and opendiff; if the tool you want to use isn't on this list, you can always use 'difftool..cmd' configuration option.

    "git difftool" accepts the same options as "git diff".

提交回复
热议问题