簡體   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