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

git-log fatal error in empty repo

From
Steve Hoelzer <shoelzer@gmail.com>
Date
Jun 7, 2007, 13:34 UTC
Message-ID
<588192970706070634s4c25ae45g68be32c06a30d043@mail.gmail.com>
git-log will return a fatal error for an empty repo, like so:

$ git --version git version 1.5.2.73.g18bece $ mkdir mytest $ cd mytest $ git-init Initialized empty Git repository in .git/ $ git-log fatal: bad default revision 'HEAD'

It would be nice if git-log was quiet or returned a "no log" message instead of the fatal error.

Steve
Next: Junio C Hamano
Message 1 of 3 in “git-log fatal error in empty repo”
  1. Steve HoelzerJun 7, 2007
  2. Junio C HamanoJun 7, 2007
  3. Geert BoschJun 9, 2007

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.