git pull错误:错误:远程ref在但预期 [英] git pull error :error: remote ref is at but expected
问题描述
$ 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
,因为两个远程分支都会匹配相同的跟踪参考。
删除错误的远程分支(你不应该只有大小写不同的分支),然后 Full message:
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. Delete the wrong remote branch (you shouldn't have branches that differ only by case) and then 这篇关于git pull错误:错误:远程ref在但预期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!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)
user_model_changes
and User_model_changes
as both of the remote branches will match the same tracking ref.git remote prune origin
and everything should work