View differences of branches with meld?

后端 未结 8 728
终归单人心
终归单人心 2020-11-30 16:30

I know that I can view the difference between HEAD and current state with meld .. But how can I view the differences between branches, for example master<

8条回答
  •  时光说笑
    2020-11-30 17:13

    Starting with git v1.7.11, you can use git difftool --dir-diff to perform a directory diff. Which works quite well with meld wihout https://github.com/wmanley/git-meld scripts.

    Configure git

    git config --global diff.tool meld
    

    Use it

    git difftool -d topic             // -d is --dir-diff
    git difftool -d master..topic
    

    For macOS

    brew cask install meld
    git config --global difftool.meld.cmd 'open -W -a Meld --args \"$LOCAL\" \"$PWD/$REMOTE\"'
    git config --global difftool.meld.trustExitCode true
    

提交回复
热议问题