I am trying to set up git post-update hook in windows environment. Here is the code:
#!/bin/sh
cd /c/inetpub/vhosts/mywebsite || exit
unset GIT_DIR
git pull hub master
exec git-update-server-info
When I run this from shell (sh post-update) everything works great. But after push I have an error:
hooks/post-update: line 7: cd: /c/inetpub/vhosts/mywebsite: Not a directory
What I'm doing wrong?