Ben Chuanlong Du's Blog

It is never too late to learn.

Use nbdime to Diff and Merge JupyterLab Notebooks

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

nbdime is a tool for diffing and merging of Jupyter notebooks. Notice that nbdime integrates with git well.

Tips and Traps

If you install nbdime to your local directory, make sure …

Tools for Differencing Text Files

General Tips

  1. If 2 files are formatted differently, you can first format them and then check the differences between them. An extreme way is to get rid of all white spaces in the 2 files and then compare them.
    sed -i 's/ //g' file_1 file_2
    

Command-line Tools

git-diff

git diff …