“ xyz ***”此时是意外的

时间:2019-02-21 09:15:14

标签: git github

我正在尝试提交我的代码并收到此错误

xyz*** was unexpected at this time.
pre-commit: 
pre-commit: We've failed to pass the specified git pre-commit hooks as the `xyz***`
pre-commit: hook returned an exit code (1). If you're feeling adventurous you can
pre-commit: skip the git pre-commit hooks by adding the following flags to your commit:
pre-commit: 
pre-commit:   git commit -n (or --no-verify)
pre-commit: 
pre-commit: This is ill-advised since the commit is broken.
pre-commit: 

注意:我的代码与遥控器同步。

1 个答案:

答案 0 :(得分:0)

该错误来自您的预提交钩子。预先提交的钩子会对您的代码执行一些检查,以防止将代码推送到远程,除非它符合某些条件。您可以查看预提交钩子,其中代码将返回退出代码1(失败)。

当然,您可以继续并提交代码,

git commit -n

但是这违背了制作预提交钩子的目的。