4
XXX /path (master)
$ git lol -1 2.1.092
warning: refname '2.1.092' is ambiguous. // HERE
*   5c3a09e (tag: release/2.1.092-rc3) A merge commit here
|\

XXX /path (master)
$ git lol -1 refs/heads/2.1.092
*   f387ed8 (origin/2.1.092, 2.1.092) Another merge commit here
|\

XXX /path (master)
$ git show-ref | grep 2.1.092
f387ed8d58ffbda85cc52f4828b061980bbb3a7d refs/heads/2.1.092
f387ed8d58ffbda85cc52f4828b061980bbb3a7d refs/remotes/origin/2.1.092
28cc8af084c435cf53076993ab85add9886abb3d refs/tags/release/2.1.092-rc2
576144d52dae89e7f749e8d41801f13844e57d22 refs/tags/release/2.1.092-rc3

XXX /path (master)
$ git here 2.1.092
warning: refname '2.1.092' is ambiguous.
commit 5c3a09e243bee1a3d81fd0a02769972fe3900b6f
Merge: e7c71d7 eded388
Author: XXXX

XXX /path (master)
$ git here 576144d52dae89e7f749e8d41801f13844e57d22
commit 5c3a09e243bee1a3d81fd0a02769972fe3900b6f

Please take a look at the 3rd line. Why is this refname ambiguous? I guess I must have messed up something with the refs.

Andrzej Gis
  • 13,706
  • 14
  • 86
  • 130

1 Answers1

3

It seems 2.1.092 is both:

  • the name of a tag referencing the merge commit 5c3a09e
  • the name of a branch (refs/heads/2.1.092, for commit f387ed8d5)

You can rename the tag or rename the branch.

As in "Git: warning: refname 'master' is ambiguous", check if you don't have a .git/2.1.092 file: if it is the case, removes it.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I've just removed both tags and it's still ambiguous. (release/2.1.092-rc2, release/2.1.092-rc3) By the way the tag is named 'release/2.1.092-rc3' while the branch is named just '2.1.092'. It's not the same – Andrzej Gis May 07 '14 at 09:17
  • @gisek what do `git remote -v` returns? (just to check if this isn't like http://stackoverflow.com/a/8586793/6309) – VonC May 07 '14 at 09:20
  • 1
    '.git/2.1.092' - that was the problem. Thanks. – Andrzej Gis May 07 '14 at 09:26