Sunday, March 10, 2013

src refspec master does not match any, Github

Got this error while pushing changes to newly created repo using windows Github client tool.

This stackoverflow post helped out: http://stackoverflow.com/questions/4181861/src-refspec-master-does-not-match-any-when-pushing-commits-in-git

Solution:
$~ mkdir repo && cd repo
$~ git remote add origin /path/to/origin.git
$~ git add .
Oops! Never committed the origin (source) branch!
$~ git push -u origin master
error: src refspec master does not match any.
Fix:
$~ git commit -m 'initial commit'
$~ git push origin master
Hope it helps

No comments:

Post a Comment