When I try to git push to h开发者_如何学JAVAeroku I get the following error:
[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.
What should I do?
You should read up on Git a little more. Git is preventing you from taking a potentially destructive action. This question isn't related to Rails or Heroku at all, really.
See http://git-scm.com/book for general git info. See this chapter for information specifically related to working with distributed repositories.
精彩评论