13

Meld is capable of loading many files at once (in tabs).

However when used with git difftool, Git will ask if you want to view each file (which can be slow and annoying to have to keep opening and closing meld).

Is there a way to load meld with every file in a tab?

(I realize why this default was chosen, diffs bay be very big, however I would find the ability to do this very handy).

5
  • 1
    Have you tried git difftool --dir-diff as per this answer? (Haven't personally tried it with Meld but someone commented that it works and it does work for me with kdiff3.) Sep 12 '16 at 11:20
  • 1
    Its handy (and worth adding as an answer), but I still need to open each file manually.
    – ideasman42
    Sep 12 '16 at 12:49
  • Have added this as an answer. When you say "open each file manually" do you mean just clicking on each file to see what the changes are? As mentioned in the answer, kdiff3 has a pane that will show all the files that have changes (in a tree structure). Sep 16 '16 at 8:29
  • 2
  • The prompt for each file can be skipped if you set git config --global difftool.prompt false
    – moltenform
    Jan 25 at 0:15
15

I'm not currently able to comment on meld as don't have it installed but for kdiff3(*), the git difftool --dir-diff command works nicely, e.g. to compare any two remote branches:

git difftool --dir-diff origin/branch1..origin/branch2

For kdiff3, this lists all the files that have changed in one pane and the differences for a selected file are shown in another pane - would imagine meld would do something similar. It can take a while before the diff comes up if there are a lot of changes.

(*) Side note - setting up kdiff: Under Windows, can install kdiff3 from here. Git can then be configured to use kdiff3 by editing C:\Users\<your username>\.gitconfig and setting the following (assuming the path to kdiff3 below is correct and replacing existing sections if present):-

[diff]
    tool = kdiff3

[difftool]
    prompt = false

[difftool "kdiff3"]
    cmd = "\"C:/Program Files/KDiff3/kdiff3.exe\" \"$LOCAL\" \"$REMOTE\""
1
  • 2
    works with meld as well.
    – Hassan
    Feb 6 '18 at 15:47
1

Something similar can be achieved with git-diffall (it's not a built-in, you have to follow that link and install it). Its syntax is just like with git diff, but it opens the difftool in directory comparison mode, showing all modified files on one screen. You can double-click them to open comparisons in tabs.

Screenshot of Meld with diffall directory comparison open

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.