警告:refname'HEAD'含糊不清 [英] warning: refname 'HEAD' is ambiguous

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

问题描述



 警告: refname'HEAD'含糊不清。 

我得到以下输出:

 警告:refname'HEAD'不明确。 
从github.com:dagda1/hornget
*分支大师 - > FETCH_HEAD
警告:refname'HEAD'含糊不清。
警告:refname'HEAD'含糊不清。

如果我执行 git branch -a



我得到以下结果:

  HEAD 
* master
remotes / emmekappa / master
remotes / origin / HEAD - >原产地/主人
遥控器/原产地/主人

我很困惑 remotes / origin / HEAD - >原产地/主人



这是什么以及如何摆脱不明确的分支。



通过执行合并,我认为我添加了不明确的分支,从而进入了这个阶段。

解决方案

是你有一个名为 HEAD 的分支,这是绝对危险的,因为这是任何分支的象征性名称是 current 分支。



重新命名它:

  git branch -m HEAD newbranch 

code>

然后您可以检查它并决定如何操作(删除它,或者保存在描述性的分支名称下)



origin / HEAD 远程分支不是问题)


I am new to Git and I seem to have one branch too many if I execute the following command:

warning: refname 'HEAD' is ambiguous.

I get the following output:

warning: refname 'HEAD' is ambiguous.
From github.com:dagda1/hornget
 * branch            master     -> FETCH_HEAD
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.

If I execute git branch -a

I get the following:

HEAD
* master
remotes/emmekappa/master
remotes/origin/HEAD -> origin/master
remotes/origin/master

I am confused by the remotes/origin/HEAD -> origin/master.

What is this and how can I get rid of the ambiguous branch.

I got to this stage by performing a merge where I think I added the ambiguous branch.

解决方案

The problem is that you have a branch called HEAD which is absolutely dangerous, since that's the symbolic name for whatever branch is the current branch.

Rename it:

git branch -m HEAD newbranch

then you can examine it and decide what to do (delete it, or save under a descriptive branch name)

(The origin/HEAD remote branch is not a problem)

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

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