Add the pre-push
file into your .git/hooks/
folder.
https://coderwall.com/p/jp7d5q/create-a-global-git-commit-hook
With there is nothing to fix, it fails to push. Tried using the technique explained here http://blog.daniel-watkins.co.uk/2013/01/git-tip-get-warning-when-file-has.html , not working.