2

我有一个用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

关于为什么钩子可能会失败的任何线索?

4

1 回答 1

1

@Mark Longair 和 @Jan Hudec,感谢您为我指明了正确的方向。

在创建接收后挂钩时,我命令 Z'd out of cat,cat 进程仍然打开该文件。

所以,我终止了这个过程,我又重新开始工作了。谢谢

于 2011-12-20T16:58:50.430 回答