1.提示出错信息:fatal: remote origin already exists.
解决办法如下:输入
$ git remote rm origin
2.错误信息: error:src refspec master does not match any
原因分析
引起该错误的原因是,目录中没有文件,空目录是不能提交上去的
解决方法
touch README
git add README
git commit -m 'first commit'
git push origin master
本文针对使用Git过程中遇到的两个典型错误提供了详细的解决方案。首先介绍了如何处理远程仓库已存在的问题,其次针对无法匹配源引用规范的情况给出了实用的步骤,确保即使是空目录也能成功提交。
743

被折叠的 条评论
为什么被折叠?



