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

From: Jakub Narebski <[email-masked]>
Date: Tue, 02 Feb 2010 07:02:33 -0800 (PST)

Ron Garret <[email-masked]> writes:

> SLSIA.  git commit-tree insists on having at least one parent commit at 
> the command line.  From reverse-engineering it seems like I could do it 
> by setting .git/HEAD to 'ref: refs/heads/some-nonexistent-branch' but 
> mucking with HEAD directly like that feels kinda scary.

You have git-symbolic-ref to set HEAD directly (don't forget to remove
index).  

Or you can set up / initialize separate (new) repository, create
commit there and then pull this new repository into current one.

P.S. Creating new root (parentless) commit isn't something that you do
on purpose, usually.

-- 
Jakub Narebski
Poland
ShadeHawk on #git