Re: How can I create a commit without a parent?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 2, 2010, 08:05 UTC
- Message-ID
- <7vwryw6p16.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <ron1-5383E3.00002602022010@news.gmane.org>
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.
A short answer is that you don't create a root commit twice in a single repository, period. Your repository _may_ be end up with more than one root but that typically is due to you fetching unrelated histories from different repositories, each created its own root.