相关疑难解决方法(0)

从git post-update钩子调用'git pull'

我有一个使用gitolite设置的中央git repo.

我想设置一个钩子,这样每当用户推送到repo时,它会执行其他地方的拉动,然后进行一些自动化测试.

到目前为止,我只想表现它.

在hooks目录中,我在更新后创建了以下脚本名称:

#!/bin/sh  
cd /home/git/www/epicac
git pull
Run Code Online (Sandbox Code Playgroud)

当我使用./post-update调用此脚本时,它完全符合我的要求.

但是,每当我挂钩时自动调用它,我得到:致命:不是git存储库:'.'

知道为什么会这样吗?

git shell githooks

17
推荐指数
3
解决办法
1万
查看次数

标签 统计

git ×1

githooks ×1

shell ×1