解决github :error: failed to push some refs to 问题

来源:互联网 发布:防晒面料 知乎 编辑:程序博客网 时间:2024/06/05 14:15

这里写图片描述
**

错误代码报告如下

**

To git@github.com:Fu4ng/Cpp.git ! [rejected]        master -> master (non-fast-forward)error: failed to push some refs to 'git@github.com:Fu4ng/Cpp.git'hint: Updates were rejected because the tip of your current branch is behindhint: its remote counterpart. Integrate the remote changes (e.g.hint: 'git pull ...') before pushing again.hint: See the 'Note about fast-forwards' in 'git push --help' for details.

解决方案

出现这个问题是你的本地库中没有README.MD 文件

解决方法也很简单
输入git pull --rebase origin master
就能把github中的MD文件拉下来了。。

在输入 git push -u origin master 就可以成功上传代码了。
这里写图片描述

0 0
原创粉丝点击