From: Jingzhao Ou <jingzhao.ou@gmail•com>
To: git@vger•kernel.org
Subject: Unable to delete remote branch with a strange name
Date: Tue, 28 Dec 2010 07:06:10 +0000 (UTC) [thread overview]
Message-ID: <loom.20101228T080344-503@post.gmane.org> (raw)
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
Pushing to jou@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 'jou@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 'jou@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
next reply other threads:[~2010-12-28 7:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-28 7:06 Jingzhao Ou [this message]
2010-12-28 8:40 ` Unable to delete remote branch with a strange name Andreas Schwab
2010-12-28 16:10 ` Jingzhao Ou
2010-12-28 17:59 ` Tomas Carnecky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20101228T080344-503@post.gmane.org \
--to=jingzhao.ou@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox