If you’re using Gitlab, you may know you could use custom hooks to validate contents. Everything is detailed in http://doc.gitlab.com/ce/hooks/custom_hooks.html
I found many examples where hooks are Ruby based and using Gitlab APIs but I wanted something in good old bash.
I found some bash hooks, https://github.com/Praqma/git-hooks, but 7 months old.