原文链接
git push -u origin master 出现问题:
error: src refspec master does not match any
error: failed to push some refs to 'https://github.com/lijianxing66628/GGNews.git'
原因:
问题一、空的暂存区时不能提交上去的
问题二、如果创建远程仓库的的时候,勾选了创建 README.md 的情况:github 中的 README.md 文件不在本地代码目录中
解决方案:
问题一:
git add .
git commit -m "commit all local code to origin"
git push -u origin master
问题二:
git pull --rebase origin master
git push -u origin master
仅用于个人学习,方便解决问题