Re: git checkout error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Angelo Borsotti <angelo.borsotti@xxxxxxxxx> writes:

> The man page describes --track and --no-track as "options". 

But the problem you observed is *not* about --track or --no-track.
It is about the "-b <branchname>" option.

You used the -b option that requires an argument, and as that
argument, you gave a string "--no-track", as if you wanted to create
a branch whose name is "--no-track".  After these words on the
command line are understood, there are two other arguments left on
the command line, which is an syntax error as far as "git checkout"
is concerned.

Again, this is asked-and-answered recently, and 

    http://thread.gmane.org/gmane.comp.version-control.git/204397

has resulted in a leading to b6312c2 (checkout: reorder option
handling, 2012-08-30), which is in v1.8.0-rc0 and onwards.  You
should get an error message that is a lot less confusing:

    $ git checkout -b --no-track topic remotes/origin/master
    fatal: '--no-track' is not a valid branch name.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]