Reputation: 151
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
Upvotes: 2
Views: 1144
Reputation: 151
git push heroku master -f
I had remove all the files which are not related to 'A' Project manually.
Upvotes: 0
Reputation: 10988
If you're absolutely sure that you simply want to push changes from app B to heroku, then you can add the -f
flag to force push.
be careful because this will automatically override whatever was previously on your master branch with what you are pushing.
It would look like:
git push heroku master -f
Upvotes: 1