-1
Ashan@DESKTOP-5GNFI1I MINGW64 ~/Desktop/SpyGlass (master)
$ git push -u origin master
error: src refspec master does not match any.
error: failed to push some refs to 'https://github.com/ashan1995/spyglass.git'

I used Gitbash from Windows 10. How can I solve this issue?

Madhukar Mohanraju
  • 2,793
  • 11
  • 28
  • Have you [followed these steps](https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/), and, if so, where did you get stuck? – Tim Biegeleisen Dec 11 '17 at 06:12
  • duplicate issue : https://stackoverflow.com/questions/4181861/src-refspec-master-does-not-match-any-when-pushing-commits-in-git – Abhishek Mishra Dec 11 '17 at 06:15
  • 1
    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) – Ewan Mellor Dec 11 '17 at 06:53

1 Answers1

0

Did you try this?

//Create a file.
touch README.md
git add README.md
git commit -m "initial commit"
git push origin master
Thushan
  • 1,220
  • 14
  • 14