Have you ever encounter situation that you, or any of your colleagues commit code, that was not working?
It could be a class with missing semicolon, that causes compile failure on deploy.
It could be small change that changed system behavior that made unit tests fail.
Or worse… it could be changed behavior that was not discovered until the user encounters it.
It happened to me several times that I or someone else did not check projects’ build after merge/rebase to master branch and just pushed changes to remote. It is not safe, and should be prevented.
How? Let me introduce you pre-commit git hook.