I created the following git hook to update my web application when new changes are pushed to the repository
#!/bin/sh
echo "Updating webapp..."
unset $(git rev-parse --local-env-vars)
(cd /var/www/webapp && git pull -q)
However, if I add new files, they get the wrong permissions. They can only be read by the owner, not by a group or other users. But I need everyone to read them. Locally they have the correct resolution bits. And even when I launch the hook manually from the shell, it works correctly. This does not work when the script is called as a hook.
Any ideas how to fix this?
PS: I am using git 1.7
Simon source
share