win10下git本地仓库连接远程仓库
写在前面
本文主要是记录连接时遇到的错误及解决方案,方便各位猿友再遇到相似问题时可以及时解决,少走弯路。
你我踟蹰行路,皆是行者
问题清单
error : src refspec master does not match any
error : failed to push some refs to 'https://github.com/name/Demo_name.git'
fatal : remote origin already exists
fatal : 'oringin' does not appear to be a git repository
fatal : Could not read from remote repository
-
fatal : Updating an unborn branch with changes added to the index
解决方案
目录中没有文件,无法提交空目录上去。
增加文件
git add text
添加注释
git commit -m 'comment_name'
推上去
git push origin master
先拉后推
先将远程仓库pull进本地仓库
然后再push出去
- 已经建立了远程连接
存储库不对
重新调整存储库
- 该点与上点一起
致命的:更新未出生的分支,并将更改添加到索引
在拉仓库时发生这个,不需要在意2333