1

How can I start a repo and push it to my Github?

I had it working fine before, but I kiled it after I tried to migrate over a db over. I erased all my remote repositories and cleared the local ones too.

I just want to start pushing my repo again. This is was I get now after I create a new repo on on github and followed the copy and paste instructions for terminal on the mac which worked fine until now.

error: src refspec master does not match any.
error: failed to push some refs to 'https://github.com/Hendrixer/Learning.git'

I've tried all the answers to the same problem with no luck. I'm new to developing in general, so I have no idea what I'm doing.

sohel khalifa
  • 5,602
  • 3
  • 34
  • 46
Scott Moss
  • 125
  • 1
  • 8

1 Answers1

1

Have you committed yet? This error message sometimes indicates there is nothing to push. See this question.

Community
  • 1
  • 1
Jasper van den Bosch
  • 3,169
  • 4
  • 32
  • 55
  • I did try to commit first with the same error. I deleted the local reop with the 'rf -rm .git' command and then 'git init' to form another. when I calling git remote -v I get this origin https://github.com/Hendrixer/treebook.git (fetch) origin https://github.com/Hendrixer/treebook.git (push) – Scott Moss Nov 23 '12 at 18:05
  • I think its also supposed to have the scheme, i.e. https. Try `git remote add origin https://github.com/Hendrixer/treebook.git` – Jasper van den Bosch Nov 23 '12 at 22:18
  • 1
    I got it. I had to "git add ." first before the commit. – Scott Moss Nov 24 '12 at 06:06