Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ruby-on-rails-3/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 3 通过Git将应用程序部署到Heroku(非快进)_Ruby On Rails 3_Git_Heroku_Localhost_Staging - Fatal编程技术网

Ruby on rails 3 通过Git将应用程序部署到Heroku(非快进)

Ruby on rails 3 通过Git将应用程序部署到Heroku(非快进),ruby-on-rails-3,git,heroku,localhost,staging,Ruby On Rails 3,Git,Heroku,Localhost,Staging,我已经设置了对Heroku的远程访问,所以我可以使用commang将我的应用程序部署到Heroku git推送暂存主机。我不知道是什么崩溃了,但是现在当我运行上一句中的命令时,我得到了错误: To git@heroku.com:mystagingapp.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'git@heroku.com:staging-

我已经设置了对Heroku的远程访问,所以我可以使用commang将我的应用程序部署到Heroku
git推送暂存主机
。我不知道是什么崩溃了,但是现在当我运行上一句中的命令时,我得到了错误:

To git@heroku.com:mystagingapp.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'git@heroku.com:staging-app.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.
我不希望任何东西合并,我只想将我的应用程序的实际版本从localhost删除到Heroku。最简单的方法是什么


非常感谢。

如果您确定只想将本地签入的内容推送到heroku,您可以执行git push-f staging master。这可能会导致从远程repo中删除提交,因此请小心使用。

如果您确定只想将本地签入的内容推送到heroku,您可以执行git push-f staging master。这可能会导致从远程repo中删除提交,因此请谨慎使用