Long story short, I created a test repo on github, cloned it locally on my linux machine. Created a post-commit hook with the following content:
#!/bin/bash
echo Test message
Added perms 777 for the hook, changed a file and when I performed the commit, I got the message on the console. So the post-commit hook seems to work. I now renamed the hook from post-commit to post-receive but after push I get no message. I keep committing and pushing to master and no message is displayed. The hook is just the same, has 777, has same content so I can't understand why as post-commit the hook works but as post-receive it doesn't. Am I missing something obvious?