Rewrite post-receive hook