How to Version-Control Jupyter Notebooks
nbstripout [1] is my favorite tool for this. Installing it in your Git repo is 2 lines:<p>$ pip install --upgrade nbstripout  # install nbstripout bin<p>$ nbstripout --install  # install Git hook in current repo<p>Then, any .ipynb files that you check in will have their output stripped in the index (without affecting your working copy).<p>(Surprised it's not mentioned in the article.)<p>[1] <a href="https://github.com/kynan/nbstripout" rel="nofollow">https://github.com/kynan/nbstripout</a>