Add a prepush hook that checks if git status is clean (or some other gir command that lists uncommitted files). If it is, either fail straight away of make the hook interactive and ask whether it's ok or something.
Maybe https://pre-commit.com/ has something already.