错误:error: failed to push some refs to 'https://github.com/pzq7025/KG.git'的解决办法

Posted future-dream

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了错误:error: failed to push some refs to 'https://github.com/pzq7025/KG.git'的解决办法相关的知识,希望对你有一定的参考价值。

一、问题
在进行【git push orgin master】的时候出现如下错误

 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to https://github.com/pzq7025/KG.git
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. git pull ...) before pushing again.
hint: See the Note about fast-forwards in git push --help for details.


二、解决
产生这个错误是由于当前版本和提交的版本较低的原因,因此使用【git push origin master -f】就可以解决这个问题。

三、结果展示
技术图片

 

四、参考
https://blog.csdn.net/crazydony/article/details/51983343

以上是关于错误:error: failed to push some refs to 'https://github.com/pzq7025/KG.git'的解决办法的主要内容,如果未能解决你的问题,请参考以下文章

解决git push出现error: failed to push some refs to 错误

提交代码报错 error: failed to push some refs to

错误上传新的项目出错 error: failed to push some refs to 'https://github.com/...

error: failed to push some refs to git的解决办法

错误:error: failed to push some refs to 'https://github.com/pzq7025/KG.git'的解决办法

Git错误:error:failed to push some refs to 'git@gitee.com:name/project.git'