tags:

views:

46

answers:

1

I am getting this error when trying to create a remote tracking branch

git co -b release_2.6 origin/release_2.6
warning: refname 'origin/release_2.6' is ambiguous.
warning: refname 'origin/release_2.6' is ambiguous.
fatal: Ambiguous object name: 'origin/release_2.6'.

I only have these two refs defined with release_2.6

git show-ref | grep "release_2.6"
a71b2da1526f73862464a23aceaa1939a8b1ace2 refs/heads/origin/release_2.6
ed1399936a8cc4cd2feed1851123af861b0ff093 refs/remotes/origin/release_2.6

Does anyone know what this error means?

Cheers

+2  A: 

If something can be found in both refs/heads/ and refs/remotes/ than this is ambiguous. You have local branch origin/release_2.6 and remote tracking branch release_2.6 for remote origin. Don't think you are supposed to have a refs/heads/origin/release_2.6 branch though. Anyway, you can specify full reference name to resolve ambiguity:

git co -b release_2.6 refs/remotes/origin/release_2.6
max
The full ref search path is described in [ *git-rev-parse(1)* in the section “Specifying Revisions”](http://www.kernel.org/pub/software/scm/git/docs/git-rev-parse.html#_specifying_revisions), under the bullet starting “A symbolic ref name. …”.
Chris Johnsen
Yes i think I added the origin/release_2.6 branch accidentally but did not see it in the list. I deleted that local branch and then it all worked. Thank you!
rube_noob