I get the error :
remote: error: cannot run hooks/post-receive: No such file or directory
echo "here we go..."
git merge origin/master
git submodule update --init --recursive
chmod a+x post-receive
This would happen if the
hooks/post-receive file exists, is marked executable, but cannot be executed. It cannot be executed, because the interpreter,
/bin/bash2, either does not exist or is not executable.
/bin/bash2 with name of bash that does exist and is executable on the server.
(The reason the error looks like this is, that the operating system only returns the error status, "No such file or directory", but does not report which file does not exist. And the code that tried to execute it does not know that the system already read
hooks/post-receive and was looking for
/bin/bash2. All it knows is it tried to run
hooks/post-receive, so that's what it prints).