Push origin master error on new repository.
Posted
by thaiyoshi
on Stack Overflow
See other posts from Stack Overflow
or by thaiyoshi
Published on 2009-05-05T23:13:57Z
Indexed on
2010/03/13
21:25 UTC
Read the original article
Hit count: 307
I just started using git with github. I followed their instructions and ran into errors on the last step. I'm checking in an existing directory that isn't currently source-controlled (project about a week old). Other than that, my use case should be pretty run of the mill.
Here's what's happening:
$ git push origin master
error: src refspec master does not match any.
fatal: The remote end hung up unexpectedly
error: failed to push some refs to '[email protected]:{username}/{projectname}.git'
Github's instructions:
Global setup:
Download and install Git
git config --global user.name "Your Name"
git config --global user.email {username}@gmail.com
Next steps:
mkdir projectname
cd projectname
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin [email protected]:{username}/{projectname}.git
git push origin master
© Stack Overflow or respective owner