Question

I would like to execute command line application before each commit (push) to central repository. If application will execute with errors, commit should fail with some message.

I have found some examples of python hooks, but nothing about calling bats or exe.

Was it helpful?

Solution

You just put the exe/batch file as the command for the hook (you probably dont need the bat and exe extensions):

[hooks]
pre-commit.example1 = /path/to/somebatfile.bat
pre-commit.example2 = /path/to/someexefile.exe
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top