Thread (5 messages) flat view 5 messages, 3 authors, 2016-06-15

Re: Unable to remove git branch

From: Sascha Peilicke <hidden>
Date: 2016-06-15 22:49:56

On Friday 29 October 2010 09:56:50 you wrote:
Mathias Lafeldt wrote:
quoted
Sascha Peilicke wrote:
quoted
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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help