Ruby on Rails: Git Push to Heroku



当我尝试git push到heroku时,我得到以下错误:

[sample_app (master)]$ git push heroku
To git@heroku.com:zachstwitterclone.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'git@heroku.com:zachstwitterclone.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.

我该怎么办?

您应该更多地阅读Git。Git阻止您执行潜在的破坏性操作。这个问题与Rails或Heroku无关,真的。

参见http://git-scm.com/book获取git的一般信息。

最新更新