Re: confusion over the new branch and merge config

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

 



On Thursday 21 December 2006 23:01, Junio C Hamano wrote:
> Nicolas Pitre <nico@xxxxxxx> writes:
> > [ Hmmm... there used to be many more (remote) branches before. 
> > Where are they? Looking into .git/refs I see a remote/ directory
> > and all remote branches are there.  But I'm cheating now because a
> > newbie might not even think of looking there.
> >
> >    Ah? there is -a and -r options to git-branch.  Fair enough. ]

Added snipped content back in
>>
>> $ git branch -r
>> * master
>>   origin/HEAD
>>   origin/html
>>   origin/maint
>>   origin/man
>>   origin/master
>>   origin/next
>>   origin/pu
>>   origin/todo

And according to the man page git branch -r should print ONLY the remote 
branches

>
> A newbie might not even expect to see "many more branches"
> because there is no "before" for him.

>
> > $ git checkout origin/next
> > git checkout: to checkout the requested commit you need to specify
> >               a name for a new branch which is created and switched

What about the error message saying that origin/next is read only.  
Something like

git-checkout: the requested commit is on a remote read only branch.  You 
need to specify a new local branch with the -b option to proceed.

> > to
> >
> > [ Hmmmmmmmm.... /me stares at the message wondering.
> >   I just want to _see_ and maybe _install_ the code from "next". ]
>
> Rewording to suggest "checkout -b newbranchname origin/next",
> perhaps?
>
> > $ git checkout -b local_next origin/next
>
> "git checkout -b next origin/next" should work just fine, I
> think.
>

-- 
Alan Chandler
http://www.chandlerfamily.org.uk
-
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]