Fix the problem about Git : fatal: Ambiguous object name: origin/release/xxx

background

Today I want to upstream a remote release branch “origin/release/20.Q2.0”, but when I do the operation of git branch --set-upstream-to=origin/release/20.Q2.0, there occurs the problem Git : fatal: Ambiguous object name: 'origin/release/20.Q2.0. Also the git checkout -b localpath remotepath does not work.

fix way

Adding refs/remotes/origin instead of simply origin/ worked, just like:
git branch --set-upstream-to=refs/remotes/origin/release/20.Q2.0

reference

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章