I had set remote access to Heroku, so I could deploy my app to Heroku with the commang
git push staging master
. I don't know what crashed, but now when I run the command from the previous sentence, so I get the error:
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.
I don't want nothing merge, I wanna just delpoy my actual version of app from localhost to Heroku. What is the easiest way to do it?
Many thanks.
If you're sure you just want to push what you've got checked in locally to heroku, you could do git push -f staging master
. That can result in deleting commits from the remote repo, so use it with care.