Re: Merge two different repositories (v2.4 + v2.5) into the one (v2.4 -> v2.5). Possible?

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

 



> 
> 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



 
--
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]