I accidentally created a git local branch called --track, how can I delete it?

Posted by Rich on Stack Overflow See other posts from Stack Overflow or by Rich
Published on 2010-05-02T02:31:17Z Indexed on 2010/05/02 2:37 UTC
Read the original article Hit count: 196

Filed under:

I mistyped a git command which resulted in the creation of a local branch called, '--track'.

I've tried the following:

git branch -m --track delme
(this renames the current branch to delme, not the branch called --track)

git checkout --track
> fatal: --track needs a branch name

git branch -d --track
(does nothing, reports nothing)

git branch -D --track
(also does nothing)

git branch -d "--track"
(also does nothing

How can I delete this branch?

© Stack Overflow or respective owner

Related posts about git