Re: DWIM "git checkout frotz" to "git checkout -b frotz origin/frotz"

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

 



On Sun, Jun 06, 2010 at 06:18:56PM +0200, Matthieu Moy wrote:

> $ git clone git://git.kernel.org/pub/scm/git/git.git
> $ cd git
> $ git checkout next
> error: pathspec 'next' did not match any file(s) known to git.
> To create a local branch from the same named remote branch, use
>   git checkout -b next origin/next
> 
> The newbie does not immediately understand the difference between
> local and remote branches, he's been told about the branch "next", and
> wants to check it out.

That is exactly my point. Trying to read the user's mind is not a
solution to this problem. The user does not even know what they are
doing and will inevitably end up even more confused.

The suggestion above would be perfect. It is an easy and obvious
solution, and the user is even educated about their mistake.
--
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]