From: THILLOSEN Andreas <thillosen@free.fr>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: git@vger.kernel.org
Subject: Re: Git: Having trouble merging two repositories by interweaving their histories
Date: Tue, 10 Sep 2013 02:19:46 +0200 [thread overview]
Message-ID: <522E65A2.3060401@free.fr> (raw)
In-Reply-To: <87fvtdbnna.fsf@igel.home>
Le 09/10/13 01:06, Andreas Schwab a écrit :
> THILLOSEN Andreas <thillosen@free.fr> writes:
>
>> It implies "interweaving" their histories, so that I can get a "state"
>> of both RepA and RepB around a same time period of time.
>
> This is only possible by rewriting every commit to point to a new tree
> containing the combined trees of the two repositories. To get a
> meaningful result this requires that both repositories have a completely
> linear history.
>
> Andreas.
>
Thanks for your answer...
I searched a little more around the web, and found some trick called
"grafting repositories".
But examples were all of the same kind: They supposed that all commits
in RepA were done before commits in RepB. For instance:
http://stackoverflow.com/questions/2428137/how-to-rebase-one-git-repository-onto-another-one
This is not my case, because I had work done in parallel in both
repositories.
So I'm not really sure that "grafting" could help in my particular case...
To make the graft permanent, they use git filter-branch, which rewrites
history (all SHA1s are changed etc.)... but as long as dates could be
kept, it would not annoy me that much.
I also found a script called git-stitch-repo in CPAN... I have not yet
tested it, but it is reported that it only works on repositories with
linear history (no merges):
http://search.cpan.org/~book/Git-FastExport-0.09/script/git-stitch-repo
This is also not my case: Merges have been done regularly on my two
repositories...
There is also this tool: CombineRepo... no idea how reliable it is, or
what limitations it entails:
https://github.com/geppo12/GitCombineRepo
So... if I understand correctly, there will be no real practical way to
merge my two repositories, in order to get an interweaving history? (not
criticizing, I only want to know where I am heading now!)
Greetings,
Andreas THILLOSEN.
prev parent reply other threads:[~2013-09-10 0:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-09 21:26 Git: Having trouble merging two repositories by interweaving their histories THILLOSEN Andreas
2013-09-09 23:06 ` Andreas Schwab
2013-09-10 0:19 ` THILLOSEN Andreas [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=522E65A2.3060401@free.fr \
--to=thillosen@free.fr \
--cc=git@vger.kernel.org \
--cc=schwab@linux-m68k.org \
/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).