github - error occurs when using git push: src refspec master does not match any. What is the reason?
PHP中文网
PHP中文网 2017-05-02 09:30:04
0
2
1011

To use git push, take the following steps:

git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/focusor/focusor.github.io.git
git push -u origin master

The following error occurs:

error: src refspec master does not match any. 
error: failed to push some refs to "xxxxxxx"

Then the solution is as follows:

git add .
git commit -m "write your meaaage"

The push was successful after that. What is the specific reason?

PHP中文网
PHP中文网

认证0级讲师

reply all(2)
巴扎黑

This kind of error is usually caused by the fact that there is no file in the temporary storage area when pushing. Check whether the README.md of add exists

PHPzhong

The above is correct, your temporary storage area has no content

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template