failed to push some refs to [email protected]

failed to push some refs to [email protected]

This error means that the upstream repository has made commits that would be lost if you were to push. First do a git pull to merge, and then push again.

In Heroku,you may have problems with pushing to master branch.
I just had to start a new branch using

git checkout -b masterbranch

and then push using

git push heroku masterbranch

please try as above!

failed to push some refs to [email protected]

Try Using

git push heroku main

instead of

git push heroku master

Reason: Because the default starting branch of git has been changed from master to main thats why your git command is not recognizing master branch and giving you ref error

Leave a Reply

Your email address will not be published.