If you don't need to "commit" the output, you can just use nbconvert[0]:

    jupyter nbconvert --clear-output --inplace my_notebook.ipynb
So you can use git as usual, like for code.

[0] -- https://nbconvert.readthedocs.io/en/latest/

nbstripout[0] does that and installs a pre-commit hook

[0] -- https://github.com/kynan/nbstripout