git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Алексей Шумкин" <zapped@mail.ru>
To: "\"Martin Krüger\"" <martin.krueger@gmx.com>
Cc: git@vger.kernel.org
Subject: Re[2]: Merge two different repositories (v2.4 + v2.5) into the one (v2.4 -> v2.5). Possible?
Date: Tue, 11 Jan 2011 15:33:29 +0300	[thread overview]
Message-ID: <76067992.20110111153329@mail.ru> (raw)
In-Reply-To: <20110111114943.40890@gmx.net>

Thank you for the answer, but it's not what I want ))
Applying patches is the same as rebasing, I guess.
But I do not want to change v2.5-repo (let's call it so) that much.
I'd like to know is there any method (low-level I suppose, as far as Git
manages tree-objects as files) to make v2.4 LAST commit to be the
parent of v2.5 FIRST commit?

MK> It's possible with a little arts an crafts.
MK> You have 2 friends:  git format-patch & git am .
MK> With "git format-patch" you  will see what a branch really is:
MK> a serie of patches.  With "git am"  you can apply these patches
MK> to a branch created on the correct point of the commit-history . E
MK> voila the branch is recreated in the repository.

MK> In your case:

MK> On the 2.5 repository master branch:
MK> git format-patch  INITIAL_COMMITID

MK> On the 2.4 repository master branch:
MK> git branch 2.5
MK> git checkout 2.4
MK> git reset --hard  INITIAL_COMMITID 
MK> cat *.patch | git am

MK> E voila you habe both branches in a single repository.

MK> Nearly  same procedure for every  branch of the  2.5 repository
MK> git checkout branchname 
MK> git format-patch master

MK> In the 2.4(Contains now both branches.) respository:
MK> git checkout 2.5
MK> git branch branchname
MK> git reset --hard CORRECT_BRANCHBASE
MK> cat *.patch | git am

  reply	other threads:[~2011-01-11 12:33 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"
2011-01-11 12:33   ` Алексей Шумкин [this message]
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=76067992.20110111153329@mail.ru \
    --to=zapped@mail.ru \
    --cc=git@vger.kernel.org \
    --cc=martin.krueger@gmx.com \
    /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).