Skip to content

Instantly share code, notes, and snippets.

@code-inflation
Created October 24, 2022 11:24
Show Gist options
  • Select an option

  • Save code-inflation/d8ee110fa0d985ea2738fcc33988cab5 to your computer and use it in GitHub Desktop.

Select an option

Save code-inflation/d8ee110fa0d985ea2738fcc33988cab5 to your computer and use it in GitHub Desktop.
nbconvert jupyter output filter for git: add to ~/.gitconfig
[filter "strip-notebook-output"]
clean = "jupyter nbconvert --ClearOutputPreprocessor.enabled=True --to=notebook --stdin --stdout --log-level=ERROR"
smudge = cat
required = true
# to activate for a repo create a .gitatributes file with the following content in the root of your repo:
# *.ipynb filter=stirp-notebook-output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment