Per Claude/Gemini recommendation. Some instructions below:
# Install
pip install nbstripout
# Set up for your repo
nbstripout --install
# Or globally
nbstripout --install --global
Can also edit the .gitattributes manually
*.ipynb filter=nbstripout
*.ipynb diff=ipynb