How to Version Control Jupyter Notebooks

For me nbdime (https://nbdime.readthedocs.io/en/stable/) works extremely well especially if you set it up so that git uses it for rendering diff’s between notebooks.

The only time people I work with run into trouble with this is when they attempt to put too much code into a notebook. However I consider this a feature not a bug as the advice then is to put that code in a .py file instead. This keeps the notebook focussed on explaining stuff and we get real IDE features for the code.

1 Like