git pull错误:错误:远程ref在但预期 [英] git pull error :error: remote ref is at but expected

查看:177
本文介绍了git pull错误:错误:远程ref在但预期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


$ b

 错误:Ref refs / remotes / origin / user在3636498c2ea7735fdcedc9af5ab3c8689e6abe77但预计a21359c6cc2097c85775cde6a40105f4bd7100ec 
从github.com:{github项目网址}
! a21359c..6273ffc用户 - > origin / user(无法更新本地ref)


解决方案

你在一个不区分大小写的文件系统(Windows或OS X)下运行git,如果有两个分支名称相同但大小写不同,例如 user_model_changes User_model_changes ,因为两个远程分支都会匹配相同的跟踪参考。



删除错误的远程分支(你不应该只有大小写不同的分支),然后 git remote prune origin p>

Full message:

error: Ref refs/remotes/origin/user is at 3636498c2ea7735fdcedc9af5ab3c8689e6abe77 but expected a21359c6cc2097c85775cde6a40105f4bd7100ec
From github.com:{github project url}
 ! a21359c..6273ffc  user -> origin/user  (unable to update local ref)

解决方案

If you are running git under a file system that is not case sensitive (Windows or OS X) this will occur if there are two branches with the same name but different capitalisation, e.g. user_model_changes and User_model_changes as both of the remote branches will match the same tracking ref.

Delete the wrong remote branch (you shouldn't have branches that differ only by case) and then git remote prune origin and everything should work

这篇关于git pull错误:错误:远程ref在但预期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆