To avoid such mistakes there exist so called git hooks.
You have to implement a git hook to check commit message before the commit.
Go to .git/hooks folder in repository.
There is a file called „commit.msg.sample“ .
Remove „sample“ in the file name.
place shell script in file „commit.msg“ which checks the commit message.