pip install --upgrade nbstripout
in target repository:
nbstripout --install
nbstripout --install --attributes .gitattributes
Using nbstripout as a pre-commit hook pre-commit is a framework for managing git pre-commit hooks.
Once you have pre-commit installed, add the follwong to the .pre-commit-config.yaml
in your repository:
repos:
- repo: https://github.com/kynan/nbstripout
rev: master
hooks:
- id: nbstripout
files: ".ipynb"