问题描述:

When using the build-in commit interface, it seems pre-commit is executed sometimes, post-commit never. I assume the configuration is ok as pre-commit gets executed (sometimes).

pre-commit:

#!/bin/sh

touch /tmp/git_heartbeat

echo "pre-commit" >> /tmp/git_heartbeat

post-commit:

#!/bin/sh

touch /tmp/git_heartbeat

echo "post-commit" >> /tmp/git_heartbeat

git push origin master

echo "post-commit done" >> /tmp/git_heartbeat

The hooks have correct permissions and executing commit from the console fires both hooks.

Any ideas?

相关阅读:
Top