I'm fairly new to coding, and was creating a discord bot in javascript. I wanted to push it to github so I could host it with heroku, and I believe I linked them all etc, but when I type "git push" I get this error exactly- (well the x is for censoring) error: src refspec refs/heads/main does not match any error: failed to push some refs to 'https://github.com/xxxxx/Discord-Bot.git'
Asked
Active
Viewed 205 times
0
-
1Does this answer your question? [How do I push a new local branch to a remote Git repository and track it too?](https://stackoverflow.com/questions/2765421/how-do-i-push-a-new-local-branch-to-a-remote-git-repository-and-track-it-too) – Phil Feb 22 '22 at 01:00
-
Looks like your repo on Github doesn't have a `main` branch (does it have `master`)? If you're pushing your first branch, you want `git push -u origin main` – Phil Feb 22 '22 at 01:00
-
Thanks so much for the suggestions, but I'm still getting the same error. I'll go back over it all, step by step but its probably just something I'm doing wrong. – Skelitin Feb 22 '22 at 01:51
-
What's the output from running `git branch` and from running `git log`? Have you made any commits yet? – torek Feb 23 '22 at 04:35