git pull error: remote ref is at but expected
来源:互联网 发布:2015酒店行业数据 编辑:程序博客网 时间:2024/05/23 20:02
Analysis
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
Solution
A
- Delete the wrong remote branch (you shouldn’t have branches that differ only by case)
git push origin -- delete branch-name
- and then
git remote prune origin
and everything should work
B
- 查看引用
git show-ref |grep branch-name
- 删除本地 ref (对远端不会有影响)
git update-ref -d refs/remotes/origin/branch-name
Related
查看分支详情
git log –source |grep branch-nameGit 清理无效的远程追踪分支
- 查看信息
git branch –a 用来查看所有的分支,包括本地和远程的。
分支在远程其实早就被删除了,但是在本地依然可以看见。
查看有关于origin的一些信息,包括分支是否tracking。
git remote show origin远程版本库上删除了某一分支,假如远程版本库名是 origin,则使用如下命令先查看哪些分支需要清理:
git remote prune origin –dry-run- 然后执行
git remote prune origin
刷新本地仓库与远程仓库的保持这些改动的同步,完成了无效的远程追踪分支的清理工作。
无效的远程追踪分支会以gone来标识
- 查看信息
Reference
- https://stackoverflow.com/questions/11796580/git-pull-error-error-remote-ref-is-at-but-expected
- https://git-scm.com/book/zh/v2/Git-%E5%86%85%E9%83%A8%E5%8E%9F%E7%90%86-Git-%E5%BC%95%E7%94%A8
- https://git-scm.com/book/zh/v2/Git-%E5%86%85%E9%83%A8%E5%8E%9F%E7%90%86-%E5%BC%95%E7%94%A8%E8%A7%84%E6%A0%BC
阅读全文
0 0
- git pull error: remote ref is at but expected
- git pull时遇到git pull error :error: remote ref is at but expected问题的解决办法
- git pull时遇到error: cannot lock ref 'xxx': ref xxx is at (一个commitID) but expected的解决办法
- git pull remote branch cannot find remote ref
- error:include/asm is a directory but symlink was expected
- git pull 报错:Your configuration specifies to merge with the ref 'master'from the remote
- Git git pull error
- MDK:test.axf: Error: L6630E: Invalid token start expected number or ( but found n at position 5 on l
- Error : (Serious) C2304E: expected but found 'void'
- ERROR:Terminal, but class was expected
- Remote git pull to update multiple servers
- git remote、pull、push、fetch等命令
- git 浅析clone,remote,fetch,pull ,push
- Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 498
- error: expected declaration or statement at end
- (git问题)解决The current branch is not configured for pull No value for key remote.origin
- git push remote error解决办法
- Puppet的错误Syntax error at ''; expected '' at
- SpringBoot对消息队列(MQ)的支持
- dev_dbg 的粗暴使用
- Spring-bean的循环依赖以及解决方式
- 流量汇总mapreduce
- Spring-day01
- git pull error: remote ref is at but expected
- 【bzoj2120】分块/带修改莫队板子
- 数据结构-算法-时间复杂度计算
- 文章标题
- KILL函数
- Struts2第四篇【请求数据自动封装、Action得到域对象】
- 关于hover,定位和请浮动
- 开发基于springMVC的web应用
- python 初学 扩展随机数及列表