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

git checkout error

From
ABAngelo Borsotti <angelo.borsotti@gmail.com>
Date
Oct 9, 2012, 07:41 UTC
Message-ID
<CAB9Jk9DUEL_J3MmH_4k7NC82m+crpCf1r3NS3gQBMZy+kvY3-A@mail.gmail.com>
Hello,

the man page of git checkout in the synopsis does not mention the --track and --no-track options. However, in the description below, it states that they are allowed. It does not say that there is a specific ordering in which they must be specified.

If they are specified after -b, the command seems to behave as if -b was not specified, e.g.:

$ git checkout -b --no-track topic remotes/origin/master fatal: git checkout: updating paths is incompatible with switching branches.

while if they are specified before -b the command behaves properly, e.g.

$ git checkout --no-track -b topic remotes/origin/master Switched to a new branch 'topic'

If this is the intended syntax, the synopsis should replace:
     git checkout [-q] [-f] [-m] [[-b|-B|--orphan] <new_branch>] [<start_point>]
by;
     git checkout [-q] [-f] [-m] [[--orphan] <new_branch>] [<start_point>]
     git checkout [-q] [-f] [-m] [ [--track|--no-track](-b|-B)
<new_branch>] [<start_point>]
-Angelo
Next: Andreas Schwab
Message 1 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.