Fred Hansen
Fred Hansen

Reputation: 55

how to use magit to diff two different files outside of repo?

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.

Upvotes: 1

Views: 225

Answers (1)

mnestorov
mnestorov

Reputation: 4484

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.

Upvotes: 4

Related Questions