Last active
August 27, 2020 16:17
-
-
Save pcolazurdo/745f4333143498a9d9356c3b31858c00 to your computer and use it in GitHub Desktop.
Snippet to add a filter action to git to upload a clean notebook (no outputs) to the repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo '[filter "strip-notebook-output"]' >>.git/config | |
echo ' clean = "jupyter nbconvert --ClearOutputPreprocessor.enabled=True --to=notebook --stdin --stdout --log-level=ERROR"' >>.git/config | |
echo \*.ipynb filter=strip-notebook-output >.gitattributes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Idea from: https://stackoverflow.com/questions/28908319/how-to-clear-an-ipython-notebooks-output-in-all-cells-from-the-linux-terminal