git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sascha Peilicke <sasch.pe@gmx.de>
To: Mathias Lafeldt <misfire@debugon.org>, git@vger.kernel.org
Subject: Re: Unable to remove git branch
Date: Fri, 29 Oct 2010 10:31:38 +0200	[thread overview]
Message-ID: <201010291031.42305.sasch.pe@gmx.de> (raw)
In-Reply-To: <4CCA7E42.7080906@debugon.org>

[-- Attachment #1: Type: Text/Plain, Size: 901 bytes --]

On Friday 29 October 2010 09:56:50 you wrote:
> Mathias Lafeldt wrote:
> > Sascha Peilicke wrote:
> >> Hi guys,
> >> 
> >> I accidentally did an 'git co -b --track origin/foo' ending up with a
> >> local branch '--track'. Sadly, git is unable to remove or rename that
> >> branch because it always interprets it as a parameter.
> >> 
> >> As a consequence, 'git br -d "--track"' does nothing and 'git br -m
> >> "--track" foo' even renames the current branch, say, master,  to 'foo'.
> >> Any hints on how to get rid of that pesky branch?
> >> 
> >> BTW please CC me as I'm not subscribed to this list.
> > 
> > Try:
> > 
> > $ git br -D -- --track
> 
> It really should be:
> 
> $ git branch -D -- --track

Thanks, that worked. Maybe '-' should not be allowed as the first char in a 
branch name?
-- 
Mit freundlichen Grüßen,
Sascha Peilicke
http://saschpe.wordpress.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2010-10-29  8:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-29  7:43 Unable to remove git branch Sascha Peilicke
2010-10-29  7:54 ` Mathias Lafeldt
2010-10-29  7:56   ` Mathias Lafeldt
2010-10-29  8:31     ` Sascha Peilicke [this message]
2010-10-29  8:42       ` Jonathan Nieder

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=201010291031.42305.sasch.pe@gmx.de \
    --to=sasch.pe@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=misfire@debugon.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).