如何在 Visual Studio Code 中查看 Jupyter Notebook git 差异?

Den*_*loe 5 python git diff visual-studio-code jupyter-notebook

如何在 Visual Studio Code 中查看 Jupyter Notebook git 差异?

一些消息来源似乎表明此功能现在可用,但我只看到原始文件的差异。 https://code.visualstudio.com/updates/v1_49#_notebooks

我使用的是最新的 Visual Studio Code 版本 1.62.3。我正在使用 Python 扩展和“本机笔记本”。我不确定是否需要添加notebook.diff.enablePreview: truesettings.json但无论如何,它没有任何效果。

更新:当我在源代码管理侧栏中的笔记本上选择“显示更改”时,我可以看到可读的差异。当我在 Git Graph 中的特定提交处的笔记本上选择“Click to View Diff”时,就会出现问题。也许这是一个 Git Graph 问题——最好的解决方法是什么?

在此输入图像描述

Dic*_*Fox 0

在您提供的链接中,该功能是通过设置notebook.diff.enablePreview为 true 来控制的