Re: confusion over the new branch and merge config
- From
Junio C Hamano <junkio@cox.net>
- Date
- Dec 22, 2006, 08:21 UTC
- Message-ID
- <7vfyb85ojf.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <200612220750.49644.alan@chandlerfamily.org.uk>
Alan Chandler <alan@chandlerfamily.org.uk> writes:
> And according to the man page git branch -r should print ONLY the remote > branches
Heh, sounds like you spotted a bug -- patches welcome (or I'll fix it myself if I get around to it before everybody else). Thanks.
Show 9 quoted lines
>> > $ 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.
I agree that explicitly suggesting the use of -b is a good idea, but your wording is a bit too specific; after all you might do
$ H=`git-rev-parse origin/next`
$ git checkout $Hand there is not enough information to say "is on a remote read only branch". We could do that with more specific hacks in git-checkout; patches welcome.