cat writebug.cn/history

一个开发者的技术博客。

git hooks post-receive 中 git pull 失败

git 在运行时会用 $GIT_DIR 这个环境变量

解决方法是在hooks脚本里面加上 unset $(git rev-parse --local-env-vars)

或者使用 env -i git pull

git git