Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.0k views
in Technique[技术] by (71.8m points)

git提交代码报错

image.png
找了很久都没有找到原因....


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

报错是因为你的 git 本地设置了 hook用到了 node ,但是似乎你本地没有安装 node ,或者没有添加到环境变量,又或者你的命令有误导致的。
可以打开项目根目录的 .git/hooks/pre-commit ,查看里面的内容,确认如果无误,可以在最前面加上 exit 0 来跳过 hooks 。如果是公司团队协作的,找你的 leader。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...