[英]Error: hooks/pre-receive exited with error code 2
I am using git repository with heroku server.我正在使用带有 heroku 服务器的 git 存储库。 I want to commit my changes on heroku server for this i run the command, git add .
我想在 heroku 服务器上提交我的更改,为此我运行命令 git add 。
git commit -m 'latest updates' git commit -m '最新更新'
git push heroku git push heroku
It give me following error,它给了我以下错误,
! ! [remote rejected] master -> master (pre-receive hook declined) error: hooks/pre-receive exited with error code 2 error: failed to push some refs to 'git@heroku.com:deliverydashboard.git'
[远程拒绝] master -> master (pre-receive hook denied) 错误:钩子/pre-receive 退出,错误代码 2 错误:无法将一些引用推送到 'git@heroku.com:deliverydashboard.git'
Please give solution over it.请给出解决方案。
This means you have not pushed the master yet.这意味着您还没有推送 master。
If you do not already have a repo:如果您还没有回购:
git init
git add .
git commit -m 'master'
Then create your app on heroku:然后在 heroku 上创建您的应用程序:
heroku create
git push heroku master
That will fix the problem.这将解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.