警告:refname'xxx'不明确 [英] warning: refname 'xxx' is ambiguous

查看:129
本文介绍了警告:refname'xxx'不明确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



这是否意味着不会有两个以上的分支,其名称以字符串开头?但是这里没有。

谢谢。

  $ git checkout B03799 
警告:refname'B03799'不明确。
转换到分行'B03799'

$ git分行-l
B03318
B03318new
B03318newnew
B03318newnewQa
B03336
B03701
* B03799
master
qa
staging


解决方案

您的回购中有 ,它也被命名为 B03799 。很可能是一个标签(使用 git tag 列出标签),分支(参见 git branch -a )以包含远程跟踪分支),或者SHA以b03799开头的提交(使用此解决方案进行验证)。 Git必须猜测你想要哪一个,但它也会给你一个警告,以便你知道它可能已经猜到了错误。



你可能想要改变你的分支命名约定以便它们不与哈希碰撞,即包括至少一个非0-9和af的字符。


I wonder why I get the warning of refname is ambiguous?

Does it mean that there are no more than two branches whose names start with the string? But there is no here.

Thanks.

$ git checkout  B03799
warning: refname 'B03799' is ambiguous.
Switched to branch 'B03799'

$ git branch -l
  B03318
  B03318new
  B03318newnew
  B03318newnewQa
  B03336
  B03701
* B03799
  master
  qa
  staging

解决方案

You have something in your repo that is also named B03799. Most likely a tag (use git tag to list tags), branch (see git branch -a to include remote tracking branches), or a commit whose SHA begins with b03799 (use i.e. this solution to verify). Git has to guess which one you want, but it also gives you a warning so that you know it might have guessed wrong.

You may want to change your branch naming convention so that they don't collide with the hashes, i.e. including at least one character other than 0-9 and a-f.

这篇关于警告:refname'xxx'不明确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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