I'm attempting to create a set of git repositories and web folders in a server using the post-update hook. It would be something like:
//server/dev (for dev files) and //server/web (the apache main path)
The post-update hook for the //server/dev git repositories:
#!/bin/sh
unset GIT_DIR
PROJECT=`basename $(pwd)`
cd ../../web/${PROJECT}
echo "Updating `pwd`..."
git reset --hard
I see the update message while pushing stuff, but the //server/web folder just won't update. It keeps showing the first commit HEAD.
"HEAD is now at XXXXXXX First Commit"
There's some solutions around, but I can't seem to get it to work properly.