git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
DDavid <bouncingcats@gmail.com>
Date
Jun 6, 2017, 02:06 UTC
Message-ID
<CAMPXz=oorE7MQa4a_1eC-+Huf1Tf2XQFjEBcQxsOdso9BJ1S-A@mail.gmail.com>
In-Reply-To
<xmqqvao9991r.fsf@gitster.mtv.corp.google.com>
On 6 June 2017 at 11:52, Junio C Hamano <gitster@pobox.com> wrote:
Show 9 quoted lines
> Samuel Lijin <sxlijin@gmail.com> 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.

$ 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)
Previous: Junio C HamanoNext: Philip Oakley
Message 8 of 17 in “What does this output of git supposed to mean ?”
  1. Kaartic SivaraamJun 5, 2017
  2. brian m. carlsonJun 5, 2017
  3. Stefan BellerJun 5, 2017
  4. Junio C HamanoJun 6, 2017
  5. brian m. carlsonJun 6, 2017
  6. Samuel LijinJun 6, 2017
  7. Junio C HamanoJun 6, 2017
  8. DavidJun 6, 2017
  9. Philip OakleyJun 6, 2017
  10. SZEDER GáborJun 6, 2017
  11. Jeff KingJun 6, 2017
  12. Jeff KingJun 6, 2017
  13. Junio C HamanoJun 6, 2017
  14. Kaartic SivaraamJun 6, 2017
  15. Philip OakleyJun 6, 2017
  16. Kaartic SivaraamJun 7, 2017
  17. Philip OakleyJun 7, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.