git报错:Your branch and ‘origin/master‘ have diverged

Posted 王睿丶

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了git报错:Your branch and ‘origin/master‘ have diverged相关的知识,希望对你有一定的参考价值。

$ git fetch origin
$ git reset --hard origin/master

以上是关于git报错:Your branch and ‘origin/master‘ have diverged的主要内容,如果未能解决你的问题,请参考以下文章

git 拉取远程分支报错(fatal: '' is not a commit and a branch '' cannot be created from it)(示例

Git拉取分支报错(fatal:‘XXX' is not a commit and a branch ‘XXX' cannot be created from it)

错误记录Git 使用报错 ( no changes added to commit (use “git add“ and/or “git commit -a“) )

错误记录Git 使用报错 ( no changes added to commit (use “git add“ and/or “git commit -a“) )

Your branch and 'origin/master' have diverged, and have 1 and 1 different commits each, resp

How to push your code in git