如何使用 magit 来区分 repo 之外的两个不同文件?

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

我想使用 magit 来区分两个文件,其中只有一个位于存储库中。这是针对 git cli here 解决的,但我不知道如何使用 Magit 来解决。如果重要的话,我还应该注意我在 windows.

来自magit documentation,它说你可以使用magit-diff-paths命令。

d p (magit-diff-paths)

Show changes between any two files on disk.

因此您可以通过 M-x magit-diff-pathsM[=27 调用它=]-x magit-diff 然后从 Actions 菜单中选择选项 p.