Thread (1 message) 1 message, 1 author, 2016-06-15

Re: incorporating the past

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:03

Thomas Hühn [off-list ref] writes:
Can I just do another git init for 0.1, commit the changes up to 1.0 and
merge those two histories? Don't I need a common ancestor for both or
something like that?

Or can I do the same, only up to 0.9 instead of 1.0, and then "sew
together" those histories?
Yes. you can "graft" two distinct histories together.

You already have v1.0..v1.6 history.  You create v0.1..v0.9
history the same way, perhaps in a separate repository.

Then, you tell git to pretend that the v1.0, which in reality
does not have any parent (i.e. "git cat-file commit v1.0" does
not have any "parent" line), has one parent that is v0.9, by
creating a file .git/info/grafts.  The file should list two
commit object names (v1.0 first and then v0.9) separated with a
single SP and then terminated with a single LF.  Each line of
this file says "this commit (the first one on the line) has the
following parents (the rest)".
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help