Thanks Mickael,

Your solution looks simple and compelling, but I'm afraid it would merge the 
_entire_ two repositories.

We only want the terminal/ and terminals/ subtrees respectively, with any 
history for stuff outside those trees pruned away ...

Thanks for the hints so far, I'd appreciate more tips on the restructuring bug 
to avoid spamming cross-project :)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=462230

Thanks,
Martin
--
Martin Oberhuber, SMTS / Product Owner - Development Tools, Wind River
direct +43.662.457915.85  fax +43.662.457915.6

From: [email protected] 
[mailto:[email protected]] On Behalf Of Mickael 
Istria
Sent: Thursday, April 09, 2015 11:36 AM
To: [email protected]
Subject: Re: [cross-project-issues-dev] How to merge (subsets of) 2 git repos 
into 1, preserving history ?

On 04/09/2015 11:14 AM, Oberhuber, Martin wrote:
Hi all,
Hi,

1.      Create a new git repo under /gitroot/tm/org.eclipse.tm.terminal.git

2.      Fill it with the following subtrees from 2 other git repos, including 
all history in those subtrees respectively:

a.       http://git.eclipse.org/c/tm/org.eclipse.tm.git/tree/terminal

b.      http://git.eclipse.org/c/tcf/org.eclipse.tcf.git/tree/terminals
Unfortunately, those repositories seem to have colliding content (pom.xml, 
.project... filed under the same relative location). This will require actual 
conflict resolution.
Do you also need to keep all branches/tags, or just merging master branches 
with history is enough?
If the later:
  $ cd org.eclipse.tm.terminal/
  $ git remote add tcf git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.git
  $ git remote add tm 
git://git.eclipse.org/gitroot/tm/org.eclipse.tm.git<git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.git>
  $ git fetch tcf master
  $ git merge FETCH_HEAD
  $ git fetch tm master
  $ git merge FETCH_HEAD
// Have fun with actual merging of files, that's where most of the work is. 
Apparently, there are "only" 8 files to merge, some of them being trivial, so 
it may be only 1 hour of work.
  $ git add admin/target-defs/*.target admin/* .gitignore
  $ git commit -m "Merge TM and TCF"
  $ git push origin HEAD:master

HTH
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat<http://www.jboss.org/tools>
My blog<http://mickaelistria.wordpress.com> - My 
Tweets<http://twitter.com/mickaelistria>
_______________________________________________
cross-project-issues-dev mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev

Reply via email to