* Unable to remove git branch
@ 2010-10-29 7:43 Sascha Peilicke
2010-10-29 7:54 ` Mathias Lafeldt
0 siblings, 1 reply; 5+ messages in thread
From: Sascha Peilicke @ 2010-10-29 7:43 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 544 bytes --]
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.
--
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 --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Unable to remove git branch
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
0 siblings, 1 reply; 5+ messages in thread
From: Mathias Lafeldt @ 2010-10-29 7:54 UTC (permalink / raw)
To: Sascha Peilicke; +Cc: git
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
-Mathias
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Unable to remove git branch
2010-10-29 7:54 ` Mathias Lafeldt
@ 2010-10-29 7:56 ` Mathias Lafeldt
2010-10-29 8:31 ` Sascha Peilicke
0 siblings, 1 reply; 5+ messages in thread
From: Mathias Lafeldt @ 2010-10-29 7:56 UTC (permalink / raw)
To: Sascha Peilicke; +Cc: git
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
('br' is an alias of mine)
Sorry for the noise.
-Mathias
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Unable to remove git branch
2010-10-29 7:56 ` Mathias Lafeldt
@ 2010-10-29 8:31 ` Sascha Peilicke
2010-10-29 8:42 ` Jonathan Nieder
0 siblings, 1 reply; 5+ messages in thread
From: Sascha Peilicke @ 2010-10-29 8:31 UTC (permalink / raw)
To: Mathias Lafeldt, git
[-- 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 --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Unable to remove git branch
2010-10-29 8:31 ` Sascha Peilicke
@ 2010-10-29 8:42 ` Jonathan Nieder
0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Nieder @ 2010-10-29 8:42 UTC (permalink / raw)
To: Sascha Peilicke; +Cc: Mathias Lafeldt, git
Sascha Peilicke wrote:
> Maybe '-' should not be allowed as the first char in a
> branch name?
Heh - see 6348624 (disallow branch names that start with a hyphen,
2010-09-14).
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-10-29 8:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2010-10-29 8:42 ` Jonathan Nieder
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).