title: Fix permissions with git post-merge
body: <p>On one server I work on, we must log in as root (for reasons I won't get into here). We have a git repository set up which is used for the web server, but since files are created as root, files modified by git have the wrong permissions.</p>
  
  <p>I created an incredibly simple post-merge hook which I thought would solve the problem.</p>
  
  <pre><code>#!/bin/bash
  . git-sh-setup
  chown -R www-data:www-data $GIT_DIR
  </code></pre>
  
  <p>I dropped this into <code>.git/hooks/post-merge</code> with execute permissions, but the file never seems to run. This is the first time I've tried to set up a hook, so maybe I'm missing something obvious.</p>
  
  <p>One thing I did notice is that most hooks had a <code>.sample</code> file, while post-merge did not. (git version 1.7.4)</p>
  
  <p>Thanks in advance!</p>