My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

heroku: [solved] failed to push some refs

Chidiebere Chukwudi's photo
Chidiebere Chukwudi
·Jun 14, 2021·

1 min read

I want to assume that you are getting this error message: *error: failed to push some refs* when you are trying to push your app to the remote git repository on heroku ?

Reason:

It maybe that your github default branch is main and not master or vice versa.

So to solve this problem you will have use your actual github default branch. In my case, I got the error because my github default branch isn't master but main.

So in my situaton instead of git push heroku master do:

git push heroku main

Your could be otherwise:

git push heroku master

But you have to confirm from your github repository