win10下git本地仓库连接本地仓库问题解决

2020-03-17  本文已影响0人  别欺负小白了好咩

win10下git本地仓库连接远程仓库

写在前面

本文主要是记录连接时遇到的错误及解决方案,方便各位猿友再遇到相似问题时可以及时解决,少走弯路。

你我踟蹰行路,皆是行者

问题清单

  1. error : src refspec master does not match any

  2. error : failed to push some refs to 'https://github.com/name/Demo_name.git'

  3. fatal : remote origin already exists

  4. fatal : 'oringin' does not appear to be a git repository

  5. fatal : Could not read from remote repository

  6. 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

上一篇 下一篇

猜你喜欢

热点阅读