I'm having trouble executing Git hooks on Windows. I have a bare repo and in it's "hooks" folder I put the following into both the "update" and "pre-push" files but the PHP script is never being executed:
"c:/Programs/PHP/php.exe" c:/Data/Scripts/git-pre-push.phpcli %1
Any ideas as to why the PHP script isn't executed?
In the Git console window I see the following when I try to push something to the bare repo:
POST git-receive-pack (437 bytes)
remote: error: hook declined to update refs/heads/master
To https://myuser@mydomain/samplerepo
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'https://myuser@mydomain/samplerepo'
...so I know that the "update" is somehow being executed. When I remove that file the push works just fine.