I have a Facebook application on my local machine and another created with Heroku (the code in the Heroku application was created automatically by Heroku). I’d like to completely replace the code within the Heroku application with the code on my local machine. I’ve already initialized a git repository in the directory on my machine where the code is and I’ve set the URL with git remote add origin git@heroku.com:my-fb-app.git. However, when I type in git push origin master I get:
To git@heroku.com:my-fb-app.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@heroku.com:blooming-cove-5867.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Obviously, this isn’t the right approach. How should I go about doing this?
you could force it
taken from https://devcenter.heroku.com/articles/git