All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@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, 02 Feb 2010 07:02:33 -0800 (PST)	[thread overview]
Message-ID: <m3zl3radgl.fsf@localhost.localdomain> (raw)
In-Reply-To: <ron1-5383E3.00002602022010@news.gmane.org>

Ron Garret <ron1@flownet.com> 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

  parent reply	other threads:[~2010-02-02 15:02 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 [this message]
2010-02-02 16:40 ` Jay Soffian

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=m3zl3radgl.fsf@localhost.localdomain \
    --to=jnareb@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.