Search code examples
githerokugit-push

Error while doing heroku push


I have two apps(say A and B) in heroku account. I pushed code of 'A'app into the other heroku app 'B' by mistake. Then i just did rollback for 'B' app.

Now when am trying to push changes into heroku app 'B' project.

it throws following error.

! [rejected]        master -> master (fetch first)
error: failed to push some refs to  'LINK TO HEROKU APP'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes

WHat to do now


Solution

  • git push heroku master -f 
    

    I had remove all the files which are not related to 'A' Project manually.