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

Re: [PATCH] prevent checkout from creating branches that start with a dash

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Jul 2, 2008, 15:38 UTC
Message-ID
<486BA0DD.5030608@viscovery.net>
In-Reply-To
<20080702150128.GH26300@jukie.net>
Bart Trojanowski schrieb:
Show 5 quoted lines
> It was previously possible to create a -f branch with git-checkout, which
> could not be used or deleted.
> 
>         $ git checkout -b -f master
>         Switched to a new branch "-f"
"-f" *is* a valid branch name and can be used and deleted:

$ git checkout -b -f next Switched to a new branch "-f" $ git checkout next Switched to branch "next" Your branch is ahead of the tracked remote branch 'origin/next' by 2 commits. $ git checkout -- -f Switched to branch "-f" $ git checkout next Switched to branch "next" Your branch is ahead of the tracked remote branch 'origin/next' by 2 commits. $ git branch -d -- -f Deleted branch -f.

-- Hannes
Previous: Brian GernhardtNext: Bart Trojanowski
Message 3 of 4 in “prevent checkout from creating branches that start with a dash”
  1. prevent checkout from creating branches that start with a dashBart Trojanowski, Jul 2, 2008
  2. Brian GernhardtJul 2, 2008
  3. Johannes SixtJul 2, 2008
  4. Bart TrojanowskiJul 2, 2008

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.