I use Git and I found this topic on hooks that allows Git to execute scripts based on events. The issue is that I'm using Windows ('$(GIT_DIR)\cmd' is on my path and I execute everything in the command line native to Windows) and I want to write the scripts in batch (rather than learning Bash or whatever).
However, I can't get any of the scripts to work. Surely they're automatically executed in the environment Git is being run in? I've only tried experiments like:
ECHO hello, world!
But nothing ever appears in the console. I've tried naming the hook 'post-commit' and 'post-commit.bat' but nothing ever happens when I make a commit.
I'm working off the assumption that I can use batch. My justification is based on the Git book on the website:
All the examples are written as shell scripts, with some Perl thrown in, but any properly named executable scripts will work fine — you can write them in Ruby or Python or what have you.
What am I doing wrong?
EDIT: Git spits out "error: cannot spawn .git/hooks/post-commit: No such file or directory" when I commit.