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

Re: How can I create a commit without a parent?

From
RGRon Garret <ron1@flownet.com>
Date
Feb 2, 2010, 08:19 UTC
Message-ID
<ron1-2FA457.00192402022010@news.gmane.org>
In-Reply-To
<7vwryw6p16.fsf@alter.siamese.dyndns.org>
In article <7vwryw6p16.fsf@alter.siamese.dyndns.org>,
 Junio C Hamano <gitster@pobox.com> wrote:
Show 7 quoted lines
> Ron Garret <ron1@flownet.com> writes:
> 
> > git commit-tree insists on having at least one parent commit at 
> > the command line.
> 
> Incorrect.  "git commit" might but "git commit-tree" does.  Perhaps you
> are forgetting that the first object name is a tree to be wrapped.
No, I didn't forget that.  I forgot to omit the -p flag.  Doh!
> A short answer is that you don't create a root commit twice in a single
> repository, period.

Why not? I could easily create an empty root commit and multiple branches off that. (Maybe that's a better way to go.) What would be the difference?

rg
Previous: Junio C HamanoNext: Jakub Narebski
Message 3 of 5 in “How can I create a commit without a parent?”
  1. Ron GarretFeb 2, 2010
  2. Junio C HamanoFeb 2, 2010
  3. Ron GarretFeb 2, 2010
  4. Jakub NarebskiFeb 2, 2010
  5. Jay SoffianFeb 2, 2010

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.