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

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:48:09

Ron Garret [off-list ref] 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.

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

From: Ron Garret <hidden>
Date: 2016-06-15 22:48:09

In article [off-list ref],
 Junio C Hamano [off-list ref] wrote:
Ron Garret [off-list ref] writes:
quoted
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.
No, I didn't forget that.  I forgot to omit the -p flag.  Doh!
A short answer is that you don't create a root commit twice in a single
repository, period.
Why not?  I could easily create an empty root commit and multiple 
branches off that.  (Maybe that's a better way to go.)  What would be 
the difference?

rg
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help