I have a script on the client machine that adds the necessary configuration stuff to gitosis.conf on the server. I'm able to push and everything works correctly.
However, I want to add a post-receive hook so that when the repository is first pushed, some particular action occurs. I tried to add it to the local repository before the first version (in .git/hooks) but the hook wasn't transferred to the server on a push.
How can I do this? There is no repository in the /srv/gitosis/repositories directory until the initial push.