git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Delete branch start with "-"

From
Björn Steinbrink <b.steinbrink@gmx.de>
Date
Apr 9, 2009, 13:12 UTC
Message-ID
<20090409131210.GE4413@atjola.homenet>
In-Reply-To
<49DDEA00.9090003@makina-corpus.com>
On 2009.04.09 14:28:48 +0200, Yoann Hervé wrote:
Show 7 quoted lines
> Hello,
> by mistake I have created a branch with a "-" at the beginning of his  
> name, and now I can't delete it.
>
> git branch -d -f
>
> error: unknown switch `s'

Uhm, that error message doesn't fit the command... Anyway, use -- to separate the branch name from the options:

git branch -d -- -f
Björn
Previous: Yoann Hervé
Message 2 of 2 in “Delete branch start with "-"”
  1. Yoann HervéApr 9, 2009
  2. Björn SteinbrinkApr 9, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.