Git分支版本不明确错误:The entered source ref is ambiguous

Git
本文将介绍怎样去解决 Git 提交版本时,抛出分支不明确错误:The entered source ref is ambiguous.

在使用 Git 提交代码的时候,抛出了如下错误:

Git分支版本不明确错误:The entered source ref is ambiguous

The entered source ref is ambiguous. You hava to make it unique (e.g. by adding "refs/heads/" as a prefix for branches or "refs/tags/" for tags)!  大概意思:输入源引用不明确,你可以通过添加前缀“refs/heads/”或者“refs/tags/”使它唯一。

产生这个错误的原因是将 git 分支名称和 tag 名称定义成一样了,均定义为 v1.0.0。push 代码到服务器将得到如下错误信息:

Git分支版本不明确错误:The entered source ref is ambiguous

解决办法:

(1)修改分支或者tag的名称,使两者不一致。

(2)通过添加前缀的方式去解决,需要在 local 或者 remote 输入框的前面添加“refs/heads/”前缀。如下图:

Git分支版本不明确错误:The entered source ref is ambiguous

点击“OK”按钮,成功了!!如下图:

Git分支版本不明确错误:The entered source ref is ambiguous

我们一定要给自己提出这样的任务:第一,学习,第二是学习,第三还是学习。 —— 列宁
1 不喜欢
说说我的看法 -
全部评论(
没有评论
关于
本网站属于个人的非赢利性网站,转载的文章遵循原作者的版权声明,如果原文没有版权声明,请来信告知:hxstrive@outlook.com
公众号