Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.7k views
in Technique[技术] by (71.8m points)

reference - Git : fatal: Ambiguous object name: 'origin/release_2.6'

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

question from:https://stackoverflow.com/questions/3782893/git-fatal-ambiguous-object-name-origin-release-2-6

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

If something can be found in both refs/heads/ and refs/remotes/ then 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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...