Re: incorporating the past

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thomas Hühn <newsgroups@xxxxxxxxxxxxxxx> 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)".

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]