views:

265

answers:

3
A: 

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
Jörg W Mittag
that's not what I'm looking for. It shows me the differences file by file. I archived that with a script diff.py and 'git diff master..devel' before. I want to see all differences and the directory tree as 'meld folderA/ folderB/' does.
Marten Bauer
Marten, that's the way git work. It only track file, so you can only see difference file by file. In git, you cannot commit an empty dir alone. Any particular reason you want to display diff between dir?
Donny Kurnia
A: 

I've been looking for a way to do branch comparison with the directory compare UI in meld but unfortunately it doesn't look like it exists yet (Meld 1.3) :-(

Colin Harrington
+2  A: 

Although it seems from the other answers as if there's not a way to do this directly in the git repository at the moment, it's easy (thanks to the answer to another question :)) to write a script that will extract the trees of two commits to temporary directories and run meld on them, removing both directories when meld exits:

http://gist.github.com/498628

Of course, you'll lose any changes made via meld, but it's quite nice for a quick overview of the differences, I think.

Mark Longair
Your script is amazing. I am just starting with Git and I thought this must be part of the package, but after much head scratching I found this. Seems to be a basic thing to check differences between branches. We are trying to fix our trunk which is messed up in subversion and we will probably use git for future branching. Really impressive!
Amala