繁体   English   中英

Git推送到heroku的操作被拒绝(非快速更新)

[英]Git pushing to heroku rejected (non-fast-forward updates)

我试图回到以前的git提交。 现在,我正在尝试将其推回heroku。

git push staging-heroku staging:master

To git@heroku.com:MyApp.git
 ! [rejected]        staging -> master (non-fast-forward)
error: failed to push some refs to 'git@heroku.com:MyApp.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again.  See the
'Note about fast-forwards' section of 'git push --help' for details.

我搜索了Stackoverflow,他们说

git push -f git@heroku.com:<heroku repo name>.git

我尝试了一下

Total 0 (delta 0), reused 0 (delta 0)


 !     Push rejected, no Cedar-supported app detected

To git@heroku.com:MyApp.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@MyApp.git'

更新

温菲尔德的建议检查我的Procfile

cat Procfile

web: node app.js

git add Procfile和git push -f git@heroku.com:MyApp.git给了我同样的错误消息。

您当前看到的错误是Heroku Ruby buildpack无法从git repo识别并与Ruby应用程序集成。

这意味着您缺少以下一个或多个:

  • Gemfile与宝石depdencies和红宝石版本
  • Procfile具有一个或多个运行的ruby进程

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM