我有一个用git --bare init
.
当我推动时,我得到:
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 368 bytes, done.
Total 4 (delta 1), reused 0 (delta 0)
fatal: exec hooks/post-receive failed.
error: hooks/post-receive exited with error code 128
hooks/post-receive 看起来像这样:
#!/bin/sh
git checkout -f
工作树是在远程配置中设置的(路径很好,如果我 cd 进入远程并git checkout -f
检查到工作树)。
钩子上的烫发看起来像:
-rwxr-xr-x 1 my-user git 28 Sep 20 2010 my.git/hooks/post-receive
关于为什么钩子可能会失败的任何线索?