Re: What does this output of git supposed to mean ?

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

 



From: "David" <bouncingcats@xxxxxxxxx>
On 6 June 2017 at 11:52, Junio C Hamano <gitster@xxxxxxxxx> wrote:
Samuel Lijin <sxlijin@xxxxxxxxx> writes:

For what it's worth, I've never quite understood the "Initial commit"
message, because the repository is in a state where there are no
commits yet, not when HEAD is pointing to a root commit.

In the context of "status", it probably is more logically correct if
it said "No commit yet" or something.  This is no longer "is initial
harder than root?" ;-)

Exactly. I agree with OP, in the context of running 'git status', I find
the string "Initial commit" confusing in the example below, because
at that time no commits exist. This creates confusion what git is
talking about. The 'git log' message is not very friendly either.

Perhaps say something like "Repository is empty." there.

<bikeshed>
I like that. I think that is a very appropriately descriptive statement.

An alternative ,with slightly less textual change, could be "Waiting for initial commit"
</bikeshed>


$ mkdir test
$ cd test
$ git init
Initialized empty Git repository in /mnt/hart/home/david_d08/junk/test/.git/
$ git log
fatal: bad default revision 'HEAD'
$ git status
On branch master

Initial commit

nothing to commit (create/copy files and use "git add" to track)




[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]