{"thread":{"id":"34543","subject":"What is the best way to perform a complex refactoring spanning multiple repositories?","startedAt":"2013-07-26T10:56:44Z","lastAt":"2013-07-26T10:56:44Z","messageCount":1,"participants":["Kristian Freed"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"224120","messageId":"CAFw3YtRyTAehOWpRkpwLWUjOFC6eB7Mk6=r_RGcjREGGHNafKA@mail.gmail.com","threadId":"34543","inReplyTo":null,"subject":"What is the best way to perform a complex refactoring spanning multiple repositories?","fromName":"Kristian Freed","fromEmail":"kristian.freed@gmail.com","sentAt":"2013-07-26T10:56:44Z","receivedAt":"2013-07-26T10:56:44Z","isPatch":false,"sender":{"key":"kristian.freed@gmail.com","avatar":null},"body":"Hi,\n\nI need to re-organize a project using git. This project currently has\n3 separate (central) repositories and I will need to move a large\nnumber of files back and forth between them. While doing this, there\nis development going on on each branch, and the restructuring will\ntake some time. I have been continuously rebasing my refactor branches\nfrom master in each respective repository.\n\nIs there an established way of doing this sort of complex cross\nrepository refactoring in a way that preserves the history across\nrepositories and takes advantage of git's rename merge logic across\nrepositories, by say moving all repos into a third one, do the merge\nand move back?\n\nEffectively, I have three repositories, A, B, and C. I want to move\nfiles from B to A and C and preserve history. This is not a simple\nmove of one directory, but a large number of individual files being\nmoved to new locations, renamed, updated etc. I have been working\nacross A, B, and C, moving and updating files, but this will obviously\nnot keep the history of the files being moved across repositories. I\nimagine that it would be possible to create a new repository D, import\nA, B, and C into sub directories, rebase to merge the individual\ncommits on A, B, and C into one new big commit on D that will make git\nunderstand that files have been moved across, not just removed in one\nplace and deleted from another, then apply the changes back to each\nindividual repository?\n\nThanks,\nKristian\n"}]}