From: Jay Soffian Date: Tue, 02 Feb 2010 16:40:53 GMT Subject: Re: How can I create a commit without a parent? Message-ID: <76718491002020840y16d62fb5qc4f6c51602dac94f@mail.gmail.com> In-Reply-To: On Tue, Feb 2, 2010 at 3:00 AM, Ron Garret wrote: > 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. I guess you're looking to do it with plumbing, but with porcelain the way I'd do it is: $ git init foo $ git init bar $ cd bar $ git commit --allow-empty -m "empty bar root commit" $ cd ../foo $ git commit --allow-empty -m "empty foo root commit" $ git fetch ../bar master:bar j.