- First, install nbstripout:
conda install -c conda-forge nbstripout
nbstripout --install
- Then, put the following lines in the .gitattributes file:
* text=auto
*.ipynb filter=nbstripout
*.ipynb diff=ipynb
- Install git large file system (lfs)
git lfs install
- Then track files:
Either git lfs track "model/*.h5"
or add model/*.h5 filter=lfs diff=lfs merge=lfs -text
in .gitattributes
If the language is not displaying correctly because of certain things e.g. hosting static files, add 'linguist-vendored' to the file/s in .gitattributes:
static/* linguist-vendored