git丨Push rejected: Push to origin/master was rejected

Posted Hrone

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了git丨Push rejected: Push to origin/master was rejected相关的知识,希望对你有一定的参考价值。

最近在使用git,push代码的过程中,遇到如下问题:

解决办法,执行git命令如下:

git pull origin master --allow-unrelated-histories

 出现下图信息,说明成功解决,重新push即可;

 

以上是关于git丨Push rejected: Push to origin/master was rejected的主要内容,如果未能解决你的问题,请参考以下文章

GitIDEA+Git使用过程中git push rejected解决

Git上传项目提示Push rejected: Push to origin/master was rejected解决办法

Push rejected: Push master to origin/master was rejected /failed to push some refs to /git did not

git之Push rejected

idea push项目到git提示Push rejected怎么解决

git push rejected处理