Git: broken hooks prevent doing a commit
Tagged:

When trying to commit a change set, git gave the following error:

fatal: exec /path/.git/hooks/pre-commit failed.

It seems that the hooks went broken somehow. Since I don't have any custom hooks, I moved the .git/hooks folder away and created an empty one. Committing to the repository works again.

Probably updating Git has broken something, I don't really know what exactly was causing this. This was Git 1.5.5 while the repository was created (and thus the hooks directory) with a lower version.

try this, chmod +x

try this,

chmod +x /path/.git/hooks/*