- Install the nbconvert package, though you probably already have it if you are using jupyter.
- Put the
nb2md
script below in your path and make executable - Add the following to your
.gitattributes
file, which can be in your home directory (usenb2md
for all projects) or in the root of your project:
*.ipynb diff=nb2md
- Run
git config --global diff.nb2md.textconv nb2md
to use nb2md
for all projects, or add the following to your project's .git/config
[diff "nb2md"]
textconv = nb2md
- 😊
this seems to fail with spaces in filenames, right?