I would like to execute a command line application before each push (push) to the central repository. If the application fails to execute, commit must end with some message.
I found some examples of python hooks but said nothing about calling bats or exe.
You just put the exe / batch file as a command for the hook (you probably don't need the bat and exe extensions):
[hooks] pre-commit.example1 = /path/to/somebatfile.bat pre-commit.example2 = /path/to/someexefile.exe