Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

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 that the directory containing executables (usually ~/.local/bin) is in $PATH so that it can be used without issues.

Installation and Configuration

You can use the following command to configure nbdime for Git.

:::bash
nbdime config-git (--enable | --disable) [--global | --system]

Register nbdime with Git for the current project/repository.

:::bash
nbdime config-git --enable

Deregister nbdime with Git for the current project/repository.

:::bash
nbdime config-git --disable

Register nbdime with Git for global users.

:::bash
nbdime config-git --enable --global

Deregister nbdime with Git for global users.

:::bash
nbdime config-git --disable --global

If you are using xinstall, a simple way to install and configure nbdime is to run the following commandd.

:::bash
xinstall nbdime -ic

Version Control Integration

nbdime config-git --enable --global

nbdime config-git --disable --global

References

nbdime

http://nbdime.readthedocs.io/en/stable/

http://nbdime.readthedocs.io/en/stable/vcs.html