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

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

    this works for me on windows 7. No need for intermediary sh scripts

    contents of .gitconfig:

        [diff]
          tool = kdiff3
    
        [difftool]
           prompt = false
    
        [difftool "kdiff3"]
          path = C:/Program Files (x86)/KDiff3/kdiff3.exe
          cmd = "$LOCAL" "$REMOTE"
    
    0 讨论(0)
  • 2020-11-22 04:09

    you can use git difftool.

    for example if you have meld, you can edit the branchs master and devel by:

    git config --global diff.external meld
    git difftool master..devel
    
    0 讨论(0)
提交回复
热议问题