git checkout error
- From
- Angelo 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