From: Jay Soffian <jaysoffian@gmail.com>
To: Ron Garret <ron1@flownet.com>
Cc: git@vger.kernel.org
Subject: Re: How can I create a commit without a parent?
Date: Tue, 2 Feb 2010 11:40:53 -0500 [thread overview]
Message-ID: <76718491002020840y16d62fb5qc4f6c51602dac94f@mail.gmail.com> (raw)
In-Reply-To: <ron1-5383E3.00002602022010@news.gmane.org>
On Tue, Feb 2, 2010 at 3:00 AM, Ron Garret <ron1@flownet.com> 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.
prev parent reply other threads:[~2010-02-02 16:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-02 8:00 How can I create a commit without a parent? Ron Garret
2010-02-02 8:05 ` Junio C Hamano
2010-02-02 8:19 ` Ron Garret
2010-02-02 15:02 ` Jakub Narebski
2010-02-02 16:40 ` Jay Soffian [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=76718491002020840y16d62fb5qc4f6c51602dac94f@mail.gmail.com \
--to=jaysoffian@gmail.com \
--cc=git@vger.kernel.org \
--cc=ron1@flownet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).