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

Re: git checkout error

From
ABAngelo Borsotti <angelo.borsotti@gmail.com>
Date
Oct 9, 2012, 23:25 UTC
Message-ID
<CAB9Jk9CZ8d=8ugYs7XHXs84Kj9xJmTHZyZ2J0hU66OBS7YDZTg@mail.gmail.com>
In-Reply-To
<m2lifg7zsj.fsf@igel.home>
Hi Andreas,
>
> -b requires an argument <new_branch>, which you specify as --no-track
> here.  <start_point> is topic, and the rest is interpreted as <paths>.
>

The man page describes --track and --no-track as "options". This is why a reader thinks that they can be specified in any order. It is also very counter-intuitive to think that --no-track is <new_branch> and <start_point> is topic. This is certainly not what the command does with these data because it creates a new branch whose name is <new_branch> and not --no-track.

I proposed a small change that clarifies the syntax, but if you prefer to keep it obscure ...

-Angelo
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 8 in “git checkout error”
  1. Angelo BorsottiOct 9, 2012
  2. Andreas SchwabOct 9, 2012
  3. Junio C HamanoOct 9, 2012
  4. Angelo BorsottiOct 9, 2012
  5. Junio C HamanoOct 9, 2012
  6. Angelo BorsottiOct 10, 2012
  7. Junio C HamanoOct 10, 2012
  8. Angelo BorsottiOct 10, 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.