Fastai-nbstripout: stripping notebook outputs and metadata for git storage

I’ve noticed that this strip out filter is causing merging/stashing problems:

git stash
Saved working directory and index state WIP on master: c945e18 - cleanup duplicated imports - use imported shortcut PIL.Image -> Image

git pull origin master
From github.com:fastai/fastai_v1
 * branch            master     -> FETCH_HEAD
error: Your local changes to the following files would be overwritten by merge:
        docs/fastai_v1.nb_001b.ipynb
        docs/fastai_v1.nb_002.ipynb
        docs/fastai_v1.nb_002b.ipynb
Please commit your changes or stash them before you merge.
Aborting

Note I haven’t touched those files under docs/.

I think git stash relies on git diff to see what changes need to be stashed, and since git diff w/ the filter returns nothing, nothing gets stashed. And then git pull sees a conflict and aborts. Any idea how to resolve that?

I ended up overwriting docs with git checkout docs, but perhaps there is a better way.