I am trying to configure my post-receive hook on git (windows). Here is the script:
#!/bin/sh echo "post-receive hook" GIT_WORK_TREE=/d/test git checkout -f
When I do git click on my local repository, I see this echo message, the script is called correctly.
But the check does not start! There is an error in the console view:
remote: fatal: Could not switch to '/d': No such file or directory
But when I put this command in git bash, it works!
source share