Is there a way to invoke Ediff from Magit in order to compare the changes to all files between two revisions, not just the changes in a single file?

My use case is a coworker will ask me to review the changes that she made in a branch, which might run over several commits. I can easily figure out that her code branched from the main branch at revision M, but I am not sure how to get magit to compare everything for me.

It appears that I can do M-x magit-log and then E r <M> <branch name>, but then it asks me for the file to compare. In this case, there are about 20 files that changed, so it is going to be annoying to related the E r sequence for each. Additionally, I would have to remember which files I have already looked at.

Ideally, I would like to either of these:

  • a buffer that lists each file and lets me click on it to start ediff, and shows when I have started ediff (or lets me delete file from the last)
  • start an ediff session for each changed file, with a buffer that lists the sessions and lets me go to them.

I am thinking of something like what ediff-directories does.

Does that capability exist?

This is different from How can I compare two commits in magit?: that wants to look at the changes in those two revisions. I want to look at the differences in all the files that are different between those two revisions, regardless of if the change occurred in the revision or a non-common ancestor.

1 Answer 1


Magit can show the difference between two commits as a diff. There are many ways to do that including:

  • d r START..END RET. You can enter START with completion and after you have typed .. you can also enter END with completion.
  • In a log use the region to mark the commits between START and END and type d d

The same is supported when using Ediff to some extend, but as you have noticed you then also have to select the file you want to compare. While Ediff provides a "session" support interface, Magit does not implement that yet.

But there is an open issue about this. It doesn't have high priority though. I don't use Ediff myself and implementing this requires more knowledge about Ediff than about Magit. Any help with this task would be appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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