Problem: Github only allows files smaller than 100MB. Consequently, if you try to push a file over that size, you will get an error when pushing.
I sometimes run into the problem of accidentally adding a big file, e.g. when a debugger created a memory dump, and forgetting about it.
Unfortunately, with the error-message only happening on push, it's possible do multiple commits after the big file was already accidentally committed, and it's a hassle to retroactively remove the big file from the commits.
Question: Is there a way to deny files over a certain size size to be added to the git index, preferably with an error on "git add .", so that file can be added to the git ignore, deleted or handled differently?