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

后端 未结 26 1962
清酒与你
清酒与你 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:03

    The following can be gleaned from the other answers here, but for me it's difficult, (too much information), so here's the 'just type it in' answer for tkdiff:

    git difftool --tool=tkdiff 
    

    You can substitute the executable name of your favorite diffing tool for tkdiff. As long as (e.g. tkdiff), (or your favorite diffing tool) is in your PATH, it will be launched.

提交回复
热议问题