View differences of branches with meld?
Short & sweet:
git config --global diff.tool meld
This configures Git to use meld
as the diff tool. (You don't need to specify the command line arguments, support for meld
is built into Git.)
Then, if you want a graphical diff instead of a textual one, you simply invoke git difftool
instead of git diff
(they both take the same arguments). In your case:
git difftool master..devel
Update: If you don't want the one-file-at-a-time diff, but instead want to use meld's "subdirectory" view with all the changes between the two branches, note the -d
or --dir-diff
option for git difftool
. For example, when I'm on branch XYZ and I want to see what is different between this and branch ABC, I run this:
git difftool -d ABC
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