当前位置: 动力学知识库 > 问答 > 编程问答 >

Pre-commit hook works in Git bash not in EGit

问题描述:

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

分享给朋友:
您可能感兴趣的文章:
随机阅读: