问题描述:

Environment: EGit 4.0.1.201506240215-r on Windows 7

I can commit with Git bash and the pre-commit hook is invoked, but when I try to commit in EGit, the pre-commit hook is not invoked.

网友答案:

GIT hooks are nothing but scripts which are to be executed by /bin/sh. Which you cannot do since you are running on Windows OS and you don't have sh.exe.

Install Cygwin

Add the cygwin_root/bin to your PATH

Make sure you install GIT during the cygwin installation(Since git hook scripts will execute git commands)

Hope this will help

相关阅读:
Top