Git 当所有修改内容已提交,git 更新不了,提示与远程分支的代码有不同时, 手动保存需要备份的代码,然后更新远程分支的代码覆盖本地代码,前提自己修改的代码量不大,然后在把自己改的合入。
报错如下:
$ git status On branch master Your branch and ‘origin/master’ have diverged, and have 3 and 4 different commits each, respectively. (use “git pull” to merge the remote branch into yours) nothing to commit, working tree clean
解决:
git fetch origin
git reset --hard origin/master
更新不下来远程代码时,报错
最新推荐文章于 2024-07-29 19:30:41 发布