I try to set up a first simple pre-commit hook on a project on windows but I don't manage to stop the commit using exit code. I use Gitkraken and it runs cygwin as shell.
The pre-commit file contains the following script:
#!/bin/sh
echo "OK THAT line works..." > test.log
exit 1
When commiting, it generates the log file but the commit is not blocked by the return code.
What am I doing wrong?