1

I'd like to use magit to diff two files, only one of which lives in a repo. This is addressed for git cli here https://stackoverflow.com/a/5637364 but I can't figure out how to do it with Magit. If it matters, I should also note that I am on windows.

  • I thin you should try `ediff` – Enze Chi Aug 20 '20 at 20:18
  • thanks. that gets me a diff, which helps. It's not in the magit interface, however. Any idea how to do it using magit? – Fred Hansen Aug 21 '20 at 01:30
  • When you do `M-x magit-diff` it pops-up a menu with options. One of the actions is `p` - Diff paths. It will ask you to specify any two files, and one can be indeed outside of a repo. Is this what you are looking for? – mnestorov Aug 21 '20 at 11:32

1 Answers1

4

From the magit documentation, it says that you can use the magit-diff-paths command.

d p (magit-diff-paths)

Show changes between any two files on disk.

So you can either call it through M-x magit-diff-paths or M-x magit-diff and then from the Actions menu, choose option p.

mnestorov
  • 4,116
  • 2
  • 14
  • 24