Re: git checkout error
- From
Andreas Schwab <schwab@linux-m68k.org>
- Date
- Oct 9, 2012, 09:36 UTC
- Message-ID
- <m2lifg7zsj.fsf@igel.home>
- In-Reply-To
- <CAB9Jk9DUEL_J3MmH_4k7NC82m+crpCf1r3NS3gQBMZy+kvY3-A@mail.gmail.com>
Angelo Borsotti <angelo.borsotti@gmail.com> writes:
> 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
-b requires an argument <new_branch>, which you specify as --no-track here. <start_point> is topic, and the rest is interpreted as <paths>.
> fatal: git checkout: updating paths is incompatible with switching branches.
This error is detected before validating <new_branch>.
> 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'
You can also specify --no-track after -b (and its argument):
$ git checkout -b topic --no-track remotes/origin/master
Andreas.
-- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."