【问题标题】:git post-receive hook error laravel on git pull command [duplicate]git pull 命令上的 git post-receive 钩子错误 laravel [重复]
【发布时间】:2020-05-04 11:29:01
【问题描述】:

尝试使用接收后脚本执行 git pull 目录。 目前我所有的脚本都是这样的:

echo 'Testing post-receive hook'
cd ~/www/test.com/laravel
pwd
git pull
cp -a ~/www/test.com/laravel/public/. ~/www/test.com/public_html/

问题是当我点击这个脚本时它返回 remote: fatal: not a git repository: '.'但是,如果我手动进入 ~/www/test.com/laravel 并执行 git pull 是否有效?任何想法都会非常有帮助。

【问题讨论】:

    标签: laravel git shared-hosting


    【解决方案1】:

    找到答案git post-receive not working correctly 在调用 git pull 之前,您必须使用 unset GIT_DIR 取消设置 git 目录

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-05-13
      • 2014-10-28
      • 1970-01-01
      • 2012-02-17
      • 1970-01-01
      • 2011-04-15
      • 1970-01-01
      相关资源
      最近更新 更多