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

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

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容