On Dec 27, 2010, at 10:51 PM, Jingzhao Ou <jingzhao...@gmail.com> wrote:

Hi, all,

When I checked out a git repository, it has the following remote
branches:

$ git br -r
 origin/HEAD -> origin/master
 origin/master
 origin/dev/main
 origin/remotes/origin/dev/main

I tried to delete the last branch with a strange long name. Using "git
push" to delete it would fail.

$ git push origin :remotes/origin/dev/main

How about
git push origin :refs/heads/remotes/origin/dev/main
?

The refs/ absolute path is useful when ambiguities exist. Reading .git/config gives some hints about how it fits together.


Pushing to j...@xx.xx.xx.xx:gsfw/omu_fw
error: dst refspec remotes/origin/dev/main matches more than one.
error: failed to push some refs to 'j...@xx.xx.xx.xx:gsfw/omu_fw'

However, I can create a new branch from it:

$ git co -b jou.temp origin/remotes/origin/dev/main
Branch jou.temp3 set up to track remote branch remotes/origin/dev/main
from origin.
Switched to a new branch 'jou.temp3'

But again, I cannot push any changes in "jou.temp3" branch to that
weird branch:

$ git push origin HEAD:remotes/origin/dev/main
error: dst refspec remotes/origin/dev/main matches more than one.
error: failed to push some refs to 'j...@xx.xx.xx.xx:gsfw/omu_fw'

I guess somehow, git is confused by "origin/dev/main" and "origin/
remotes/origin/dev/main". Especially, it cannot identify the latter
properly.

I wonder if any one can give me some suggestions on how to deal with
this situation.

Thanks a lot!
Jingzhao

--
You received this message because you are subscribed to the Google Groups "Git for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/git-users?hl=en .


--
You received this message because you are subscribed to the Google Groups "Git for 
human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to