美文网首页搜藏
Git 提示error:src refspec master d

Git 提示error:src refspec master d

作者: MachinePlay | 来源:发表于2019-03-02 22:23 被阅读0次

git push origin master提示

error:src refspec master does not match any

问题产生原因分析

引起该错误的原因是,目录中没有文件,空目录是不能提交上去的,而且在push之前至少有过一次commit
解决方法

git init 
git touch READMEgit 
git add README 
git commit -m 'first commit'
git remote add origin https://github.com/xxx.github.io.git
git push origin master

相关文章

网友评论

    本文标题:Git 提示error:src refspec master d

    本文链接:https://www.haomeiwen.com/subject/gafuuqtx.html