From: Junio C Hamano <junkio@cox.net>
To: "Thomas Hühn" <newsgroups@thomas-huehn.de>
Cc: git@vger.kernel.org
Subject: Re: incorporating the past
Date: Mon, 09 Apr 2007 12:59:10 -0700 [thread overview]
Message-ID: <7vejmtz5dd.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <87d52d1kli.fsf@mid.thomas-huehn.de> (Thomas Hühn's message of "Mon, 09 Apr 2007 20:14:17 +0200")
Thomas Hühn <newsgroups@thomas-huehn.de> 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)".
prev parent reply other threads:[~2007-04-09 19:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-09 18:14 incorporating the past Thomas Hühn
2007-04-09 18:32 ` Shawn O. Pearce
2007-04-09 19:59 ` Junio C Hamano [this message]
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=7vejmtz5dd.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=newsgroups@thomas-huehn.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).