Thread (17 messages) flat view 17 messages, 8 authors, 2016-06-15

Re: master^ is not a local branch -- huh?!?

From: Nicolas Pitre <nico@fluxnic.net>
Date: 2016-06-15 22:48:08

Possibly related (same subject, not in this thread)

On Fri, 29 Jan 2010, Junio C Hamano wrote:
Sverre Rabbelier [off-list ref] writes:
quoted
quoted
master^ is a commit (the first parent of master), not a branch (local
or otherwise).
Perhaps we should change the message to say "not a branch" if it's not
a reference to a remote branch? Or simply changing the text to "not a
(local) branch"?
I think "not a branch" is a good suggestion, whether the target of
checkout is "master^" or "origin/topic".

These days, you can say "git checkout topic" to automagically create a
local "topic" branch that forks from "origin/topic" remote tracking branch
when you have one, thanks to Dscho's UI improvement ideas (one less
reason you may end up on a detached HEAD state without wanting to).
If this is the case then I'm really disappointed.

With all due respects, I don't share Dscho's sentiment about Git's 
alleged non user-friendliness.  And I always praised Git's ability to 
use a detached head to check out a remote branch, and never had any 
problem teaching this concept to people.  So the above is not a UI 
improvement at all to me.


Nicolas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help