0

I am trying to upload my bot to Heroku and i ended up getting this error. I don't know what to do now. I tried to do what someone else on Stack Overflow said to do on someone else's problem and it didn't help me.

> git push heroku master
error: src refspec master does not match any.
error: failed to push some refs to 'https://git.heroku.com/flankebot.git'

I have tried to do the git pull --rebase then tried to repush it and it done nothing.

halfer
  • 19,824
  • 17
  • 99
  • 186
  • Possible duplicate of [src refspec master does not match any when pushing commits in git](https://stackoverflow.com/questions/4181861/src-refspec-master-does-not-match-any-when-pushing-commits-in-git) – c-x-berger Sep 14 '18 at 01:49
  • I've restored the edit from @c.berger, please do not roll it back again. We prefer text over images of text here, since text works better with clipboards, screen-readers and search engines. Thanks! – halfer Sep 14 '18 at 21:03
  • Please read [Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers?](//meta.stackoverflow.com/q/326569) - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions. – halfer Sep 14 '18 at 21:26

1 Answers1

0

First check if you are on a branch with git branch and git status.

If your branch is not master, then type:

git push heroku myBranch:master

(replacing myBranch with your current branch name)

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250