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

Cannot delete weirdly named branch

From
Aabhisekpan@gmail.com <abhisekpan@gmail.com>
Date
Jul 23, 2012, 18:32 UTC
Message-ID
<CAGhmpEGEZchXc4DqZ21BAKxf6_mHRp=TOUH8s=GG0vPscz1kfg@mail.gmail.com>
In-Reply-To
<CAGhmpEFg2ZcwqO=wDNPLfPCnrobq4oOcwvFCm27vrEuiES2XbQ@mail.gmail.com>
Hi,

I am a new user to git and I found an interesting behavior in git. I am not sure if this is a bug, but I thought I would report this anyway!

So I can create a local branch called "--tracking" like this: git checkout -b --tracking origin/somebranch I messed up the syntax while trying to create a tracking branch, but this resulted in a local branch called "--tracking".

Now I cannot delete this branch. Running: git branch -d --tracking gives an error: unknown option `tracking'

Using quotes around the name does not help. Is there another command I can use to delete this branch?

Thank you! -- Abhisek Live Long and Prosper

Next: Junio C Hamano
Message 1 of 4 in “Cannot delete weirdly named branch”
  1. abhisekpan@gmail.comJul 23, 2012
  2. Junio C HamanoJul 23, 2012
  3. Michael HaggertyJul 30, 2012
  4. Junio C HamanoJul 30, 2012

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.