On one server I'm working on, we need to log in as root (for reasons that I will not log in here). We have a git repository that is used for the web server, but since files are created as root, files modified with git have incorrect permissions.
I created an incredibly simple hook after the merge, which I thought would solve the problem.
#!/bin/bash . git-sh-setup chown -R www-data:www-data $GIT_DIR
I dumped this in .git/hooks/post-merge with execute permissions, but the file never ran. This is the first time I have tried to adjust the hook, so maybe I am missing something obvious.
One thing I noticed is that most hooks had a .sample file, and post merge .sample n't. (git version 1.7.4)
Thanks in advance!
source share