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

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

 



On Fri, Jan 29, 2010 at 8:22 PM, Nicolas Pitre <nico@xxxxxxxxxxx> wrote:
> On Fri, 29 Jan 2010, Mark Lodato wrote:
>
>> Still, I find it slightly confusing and unfriendly.  How about the following?
>
> It is slightly inaccurate.

Is the following the only inaccuracy?  Do you have any other feedback?

>> Checking out commit 'master^0'.
>>
>> Since this is not a local branch head, any commits you make will be lost
>> when you check out another branch or commit.  (In git terminology, HEAD
>> is detached.)  If you just wish to look at files without committing,
>> this is fine.  If you wish to make commits and retain them, you may
>> create a new branch by running:
>>
>>   git checkout -b <new_branch_name>
>
> This gives the impression that any commit you make on a detached HEAD
> are going to be lost, unless you create a new branch first.

What about "...you may want to create..."?  This does not imply that
creating a new branch now is the *only* way, just the most likely.  If
a user knows another way, that user probably does not need this
warning in the first place.
--
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]