Jupyter notebook outputs can be large (plots, images, etc.), making Git repo history excessively large and making Git operations slower as the Git history grows. Jupyter notebook outputs can reveal personal information with regard to usernames, Python executable, directory layout, and data outputs.
Tell Git user-wide where to find Git hooks:
git config --global core.hooksPath ~/.git/hooks
Edit the file ~/.git/hooks/pre-commit to contain: