From: "\"Martin Krüger\"" <martin.krueger@gmx.com>
To: "\"ÐлекÑей ШÑмкин\"" <zapped@mail.ru>, git@vger.kernel.org
Subject: Re: Merge two different repositories (v2.4 + v2.5) into the one (v2.4 -> v2.5). Possible?
Date: Tue, 11 Jan 2011 12:49:43 +0100 [thread overview]
Message-ID: <20110111114943.40890@gmx.net> (raw)
In-Reply-To: <746745466.20110111134101@mail.ru>
>
> Now I'd like to merge them as v2.5 was a continuos branch from v2.4,
> but without a rebasing (i.e. without a global changing of v2.5
> repository, which already has another branches)
> It must look like LAST commit of v2.4 should be a PARENT of FIRST commit
> of v2.5
>
> Now there's a question: Is it possible to do so (no rebasing!), and If
> "yes" then how to?
>
>
It's possible with a little arts an crafts.
You have 2 friends: git format-patch & git am .
With "git format-patch" you will see what a branch really is:
a serie of patches. With "git am" you can apply these patches to a branch created on the correct point of the commit-history . E voila the branch is recreated in the repository.
In your case:
On the 2.5 repository master branch:
git format-patch INITIAL_COMMITID
On the 2.4 repository master branch:
git branch 2.5
git checkout 2.4
git reset --hard INITIAL_COMMITID
cat *.patch | git am
E voila you habe both branches in a single repository.
Nearly same procedure for every branch of the 2.5 repository
git checkout branchname
git format-patch master
In the 2.4(Contains now both branches.) respository:
git checkout 2.5
git branch branchname
git reset --hard CORRECT_BRANCHBASE
cat *.patch | git am
Best regards
martin
next prev parent reply other threads:[~2011-01-11 11:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-11 10:41 Merge two different repositories (v2.4 + v2.5) into the one (v2.4 -> v2.5). Possible? Алексей Шумкин
2011-01-11 11:49 ` "Martin Krüger" [this message]
2011-01-11 12:33 ` Re[2]: " Алексей Шумкин
2011-01-11 12:41 ` Andreas Ericsson
2011-01-11 14:58 ` Re[2]: " Алексей Шумкин
2011-01-11 12:47 ` "Martin Krüger"
2011-01-11 13:21 ` Jakub Narebski
2011-01-11 14:49 ` Re[2]: " Алексей Шумкин
2011-01-11 15:16 ` Алексей Шумкин
2011-01-12 0:08 ` [RFC/PATCH] Documentation: start to explain what git replace is for Jonathan Nieder
2011-01-12 22:47 ` Maaartin
2011-01-13 7:52 ` Alexey Shumkin
2011-01-14 8:49 ` [RFC/PATCH 2/1] fixup! " Jonathan Nieder
2011-01-14 17:44 ` Maaartin-1
2011-01-14 19:30 ` Jonathan Nieder
2011-01-14 21:09 ` how multiple roots happen (Re: [RFC/PATCH 2/1] fixup! Documentation: start to explain what git replace is for) Jonathan Nieder
2011-01-14 22:48 ` [RFC/PATCH 2/1] fixup! Documentation: start to explain what git replace is for Jakub Narebski
2011-01-15 0:04 ` Maaartin-1
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=20110111114943.40890@gmx.net \
--to=martin.krueger@gmx.com \
--cc=git@vger.kernel.org \
--cc=zapped@mail.ru \
/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).