Skip to content

laurensdeprez/use_ipynb_git

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Using nbstripout

nbstripout is a filter that removes numbering and output from jupyter notebooks.

The script nbstripout was found here with inspiration from here (see the discussion there).

Short

Download the file.

Add the following in the file .git/config:

[filter "stripoutput"]
       clean = "scripts/nbstripout"
       smudge = cat
       required

and also write a .gitattributes file:

*.ipynb filter=stripoutput

Long

Whenever a Jupyter notebook (detected by the extension .ipynb) is submitted to git diff or git commit, it is converted by the filter. The filter removes all numbering (that might change upon execution) and the output (that might contain binary data for figures, etc).

About

How to use nbstripout

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 52.0%
  • Python 48.0%