6

I am just trying to follow the step from heroku site. but on my console when i git push to heroku main? that doesn't work.

Some error showing. like below.

C:\Users\TORU\Desktop\Website Again\Python\django_files\hero\hero_con>git push heroku main
error: src refspec main does not match any
error: failed to push some refs to 'https://git.heroku.com/secure-taiga-84539.git'

what i do now??

alhasantoru
  • 61
  • 1
  • 2

2 Answers2

5

The default branch is normally called master, not main. So, normally git push heroku master works.

Your error src refspec main does not match any seems to indicate that the branch main does not exist.

Are you sure that your branch is called main?

Ralf
  • 16,086
  • 4
  • 44
  • 68
0

If you had already initialized your app and committed/staged the changes on your files, you probably need to run this command heroku git:remote -a yourapp. Here your app will be the heroku app created like enigmatic-brook-14304 or any name the heroku gave your app after running this command heroku create. From there you will be required to git push heroku to master. You might have to run `git branch just to be sure on which branch are you currently operating from.

Kimanthi K.
  • 595
  • 6
  • 13