News for hackers. Stuff that matters.
Re:Ask HN: Are there any good Diff tools for Jupyter Notebooks? by ivan_ah on Sunday May 22, 2022 @07:11PM (#31473731)
I use nbdime daily for notebooks under version control thanks to the following configs in my ~/.gitconfig (global git config).

   [diff "jupyternotebook"]
     command = git-nbdiffdriver diff --ignore-details
   [difftool "nbdime"]
     cmd = git-nbdifftool diff --ignore-details \"$LOCAL\" \"$REMOTE\" \"$BASE\"
I'm not sure if this is a standard setup or if I copy-pasted from some blog post, but overall it's working great.

There are some issues with it, like (1) will unnecessarily mark graphics as changed (e.g. re-generated figures from the same code), and (2) the diffs become less meaningful if large chunks of cells were moved, but overall it works great.

If it supported a `--color-words` option then it would be super helpful for seeing only which words have changes, instead of whole lines changed (very good for long paragraphs of Markdown text).

There are no comments on this comment yet.