当我尝试git push to 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.
我该怎么办?
答案 0 :(得分:3)
你应该多读一下Git。 Git阻止你采取潜在的破坏性行动。这个问题根本与Rails或Heroku无关。
有关常规git信息,请参阅http://git-scm.com/book。有关使用分布式存储库的具体信息,请参阅this chapter。