我尝试回到之前在 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'
更新
Winfield 建议检查我的 Procfile
cat Procfile
web: node app.js
git add Procfile 和 git push -f git@heroku.com:MyApp.git 给了我同样的错误信息。