Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

A month ago, based my question Git prime/hub website deployment: documentroot changes save fine but permission denied for subdirectories, I received some great help from dawud for setting up a post-update hook helper that would correctly change the permissions.

Whether I use the command line, or use the Github for Windows client, my syncs take forever. As in, "go and pour yourself another coffee" forever, even if I'm only syncing a change to one 2K file. I even changed the permissions line in the hook helper to only change the perms on the files that needed them but it still took a couple of minutes.

Any ideas?

Here's the helper script that's called in the post-update hook:


echo "**** Pulling changes into Prime [Hub's post-update hook]"

cd /usr/local/apache/htdocs || exit
unset GIT_DIR
git pull hub master
find /usr/local/apache/htdocs \( -user apache -group apache -o -exec chown
apache:apache {} + \) \( -type d ! -perm 755 -exec chmod 755 {} + -o -type f ! -perm   644 -exec chmod 644 {} + \)
exec /usr/libexec/git-core/git-update-server-info
share|improve this question
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.